Skip to content

Commit

Permalink
changes after review
Browse files Browse the repository at this point in the history
  • Loading branch information
dzonidoo committed Oct 10, 2024
1 parent 3bcfb40 commit d0dc8a5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 625 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as React from 'react';
import {ISearchPanelWidgetProps, ISuperdesk} from 'superdesk-api';
import {CheckboxButton, Spacer} from 'superdesk-ui-framework/react';

type IMediaType = 'Image' | 'Video';

Expand Down Expand Up @@ -51,17 +52,13 @@ export const searchPanelWidgetFactory = (

return (
<fieldset>
<div className="field flex-grid flex-grid--boxed-small flex-grid--small-2 sd-margin-t--2">
{mediaTypes.map((type) => (
<button
key={type.type}
className={'toggle-button' + (this.isActive(type.type) ? ' toggle-button--active' : '')}
onClick={() => this.toggleMediaType(type.type)}
>
{type.label}
</button>
))}
</div>
<div className="field sd-margin-t--2">
<Spacer h gap={'4'}>
{mediaTypes.map((type, i) => (
<CheckboxButton key={i} checked={this.isActive(type.type)} label={{text: type.label}} onChange={() => this.toggleMediaType(type.type)} />
))}
</Spacer>
</div>
<div className="field">
<label className="search-label">{gettext('From')}</label>
<input type="date" value={params.from || ''}
Expand Down
Loading

0 comments on commit d0dc8a5

Please sign in to comment.