Commit a4831b57 authored by Lyza Danger Gardner's avatar Lyza Danger Gardner Committed by Lyza Gardner

Move common `ui-playground` components into a `shared` directory

In the soon-future, we'll want to extract the common bits of the
UI Playground app to the `frontend-shared` repository. This is step 1.
parent 35fe4ef8
import {
PatternPage,
Pattern,
PatternExamples,
PatternExample,
} from '../PatternPage';
import Menu from '../../../../src/sidebar/components/Menu';
import MenuItem from '../../../../src/sidebar/components/MenuItem';
export default function MenuPatterns() {
return (
<PatternPage title="Menu">
<Pattern title="Menu">
<p>A simple Menu usage example</p>
<PatternExamples>
<PatternExample details="Menu">
<Menu title="Example Menu" label="Edit">
<MenuItem label="Zoom in" />
<MenuItem label="Zoom out" />
<MenuItem label="Undo" />
<MenuItem label="Redo" />
</Menu>
</PatternExample>
</PatternExamples>
</Pattern>
</PatternPage>
);
}
import { registerIcons } from '@hypothesis/frontend-shared';
import { render } from 'preact';
import PlaygroundApp from './components/PlaygroundApp';
import PlaygroundApp from './shared/components/PlaygroundApp';
import sidebarIcons from '../../src/sidebar/icons';
registerIcons(sidebarIcons);
......
import { SvgIcon } from '@hypothesis/frontend-shared';
import MenuPatterns from './patterns/MenuPatterns';
import SharedButtonPatterns from './patterns/SharedButtonPatterns';
import { useRoute } from '../router';
......@@ -20,11 +19,6 @@ const routes = [
title: 'Home',
component: HomeRoute,
},
{
route: '/menu',
title: 'Menu',
component: MenuPatterns,
},
{
route: '/shared-buttons',
title: 'Buttons (Shared)',
......
......@@ -9,7 +9,7 @@ import {
IconButton,
LabeledButton,
LinkButton,
} from '../../../../src/shared/components/buttons';
} from '../../../../../src/shared/components/buttons';
export default function SharedButtonPatterns() {
return (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment