react-code-dataset / wp-calypso /packages /components /src /component-swapper /stories /index.stories.jsx
react-code-dataset / wp-calypso /packages /components /src /component-swapper /stories /index.stories.jsx
Download wp-calypso/packages/components/src/component-swapper/stories/index.stories.jsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 710 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/component-swapper/stories/index.stories.jsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/packages/components/src/component-swapper/stories/index.stories.jsx
-
curl -L -o index.stories.jsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/packages/components/src/component-swapper/stories/index.stories.jsx
710 Bytes
| import ComponentSwapper from '../.'; | |
| import { Button } from '../../.'; | |
| export default { title: 'Unaudited/Component swapper' }; | |
| const ComponentSwapperVariations = () => { | |
| return ( | |
| <div> | |
| <h1>660px example</h1> | |
| <ComponentSwapper | |
| // eslint-disable-next-line no-console | |
| onSwap={ () => console.log( 'swapping' ) } | |
| breakpoint="<660px" | |
| breakpointActiveComponent={ <Button primary>Active breakpoint - primary button</Button> } | |
| breakpointInactiveComponent={ <Button>Inactive breakpoint - regular button</Button> } | |
| > | |
| <div style={ { padding: '10px 0' } }> Example child node </div> | |
| </ComponentSwapper> | |
| </div> | |
| ); | |
| }; | |
| export const Default = () => <ComponentSwapperVariations />; | |