diff options
Diffstat (limited to 'src/components/StyleGuide.tsx')
| -rw-r--r-- | src/components/StyleGuide.tsx | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/components/StyleGuide.tsx b/src/components/StyleGuide.tsx index ee38697..910c538 100644 --- a/src/components/StyleGuide.tsx +++ b/src/components/StyleGuide.tsx @@ -4,6 +4,7 @@ import Loading from 'src/components/Loading'; import Button from './Button'; import Input from './Input'; +import { ZapAnimated } from './shared/ZapAnimated'; import SwitchThemed from './SwitchThemed'; import ToggleSwitch from './ToggleSwitch'; @@ -21,7 +22,9 @@ const optionsRule = [ { label: 'Direct', value: 'Direct' }, ]; -const Pane = ({ children, style }) => <div style={{ ...paneStyle, ...style }}>{children}</div>; +const Pane = ({ children, style }: { children: React.ReactNode; style?: React.CSSProperties }) => ( + <div style={{ ...paneStyle, ...style }}>{children}</div> +); function useToggle(initialState = false) { const [onoff, setonoff] = React.useState(initialState); @@ -40,19 +43,18 @@ class StyleGuide extends PureComponent { render() { return ( <div> - {/* @ts-expect-error ts-migrate(2741) FIXME: Property 'style' is missing in type '{ children: E... Remove this comment to see the full error message */} + <Pane> + <ZapAnimated /> + </Pane> <Pane> <SwitchExample /> </Pane> - {/* @ts-expect-error ts-migrate(2741) FIXME: Property 'style' is missing in type '{ children: E... Remove this comment to see the full error message */} <Pane> <Input /> </Pane> - {/* @ts-expect-error ts-migrate(2741) FIXME: Property 'style' is missing in type '{ children: E... Remove this comment to see the full error message */} <Pane> <ToggleSwitch name="test" options={optionsRule} value="Rule" onChange={noop} /> </Pane> - {/* @ts-expect-error ts-migrate(2741) FIXME: Property 'style' is missing in type '{ children: E... Remove this comment to see the full error message */} <Pane> <Button text="Test Lxatency" start={<Zap size={16} />} /> <Button text="Test Lxatency" start={<Zap size={16} />} isLoading /> |
