Skip to content

Commit

Permalink
feat: rename pane to menu
Browse files Browse the repository at this point in the history
  • Loading branch information
gorjan5sk committed Jul 8, 2021
1 parent 1231226 commit b7a9329
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions app/assets/javascripts/components/preferences/menu.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { observer } from 'mobx-react-lite';
import { FunctionComponent } from 'preact';
import { PreferencesMenuItem } from '../PreferencesMenuItem';
import { MockState } from './mock-state';

interface PreferencesMenuProps {
store: MockState;
}

export const PreferencesMenu: FunctionComponent<PreferencesMenuProps> =
observer(({ store }) => (
<div className="flex flex-col px-3 py-6 overflow-y-auto">
{store.items.map((pref) => (
<PreferencesMenuItem
key={pref.id}
iconType={pref.icon}
label={pref.label}
selected={pref.selected}
onClick={() => store.select(pref.id)}
/>
))}
</div>
));

0 comments on commit b7a9329

Please sign in to comment.