react-code-dataset / wp-calypso /client /devdocs /design /wordpress-components-gallery /font-size-picker.tsx
react-code-dataset / wp-calypso /client /devdocs /design /wordpress-components-gallery /font-size-picker.tsx
Download wp-calypso/client/devdocs/design/wordpress-components-gallery/font-size-picker.tsx from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 567 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/design/wordpress-components-gallery/font-size-picker.tsx
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/wp-calypso/client/devdocs/design/wordpress-components-gallery/font-size-picker.tsx
-
curl -L -o font-size-picker.tsx https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/wp-calypso/client/devdocs/design/wordpress-components-gallery/font-size-picker.tsx
567 Bytes
| import { FontSizePicker } from '@wordpress/components'; | |
| import { useState } from 'react'; | |
| const FontSizePickerExample = () => { | |
| const [ fontSize, setFontSize ] = useState< string | number | undefined >( 16 ); | |
| return ( | |
| <FontSizePicker | |
| fontSizes={ [ | |
| { | |
| name: 'Small', | |
| slug: 'small', | |
| size: 12, | |
| }, | |
| { | |
| name: 'Normal', | |
| slug: 'normal', | |
| size: 16, | |
| }, | |
| { | |
| name: 'Big', | |
| slug: 'big', | |
| size: 26, | |
| }, | |
| ] } | |
| value={ fontSize } | |
| onChange={ setFontSize } | |
| /> | |
| ); | |
| }; | |
| export default FontSizePickerExample; | |