diff options
| author | Matain <[email protected]> | 2022-06-12 23:34:56 +0800 |
|---|---|---|
| committer | Matain <[email protected]> | 2022-06-12 23:34:56 +0800 |
| commit | ea5d7cf003eeef30cb7bbe789c6ba7f314bf1ce4 (patch) | |
| tree | bff1bd7b0e8e8eb753d373b57f007bbe97f96c76 /src/components/StyleGuide.tsx | |
| parent | 4fd2c8f646e48dd0c07d0c2041de52e9a4f8bc82 (diff) | |
| parent | 38571da24ac54137564be5e41b7a409009e2ee10 (diff) | |
Merge branch 'master' of https://github.com/haishanh/yacd into haishanh-master
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 /> |
