diff --git a/packages/components/src/font-size-picker/stories/index.js b/packages/components/src/font-size-picker/stories/index.js new file mode 100644 index 00000000000000..7b377716a30f09 --- /dev/null +++ b/packages/components/src/font-size-picker/stories/index.js @@ -0,0 +1,107 @@ +/** + * External dependencies + */ +import { number, object } from '@storybook/addon-knobs'; + +/** + * WordPress dependencies + */ +import { useState } from '@wordpress/element'; + +/** + * Internal dependencies + */ +import FontSizePicker from '../'; + +export default { title: 'FontSizePicker', component: FontSizePicker }; + +const FontSizePickerWithState = ( { ...props } ) => { + const [ fontSize, setFontSize ] = useState( 16 ); + + return ( + + ); +}; + +export const _default = () => { + const fontSizes = object( 'Font Sizes', [ + { + name: 'Small', + slug: 'small', + size: 12, + }, + { + name: 'Normal', + slug: 'normal', + size: 16, + }, + { + name: 'Big', + slug: 'big', + size: 26, + }, + ] ); + return ( + + ); +}; + +export const withSlider = () => { + const fontSizes = object( 'Font Sizes', [ + { + name: 'Small', + slug: 'small', + size: 12, + }, + { + name: 'Normal', + slug: 'normal', + size: 16, + }, + { + name: 'Big', + slug: 'big', + size: 26, + }, + ] ); + const fallbackFontSize = number( 'Fallback Font Size - Slider Only', 16 ); + return ( + + ); +}; + +export const withoutCustomSizes = () => { + const fontSizes = object( 'Font Sizes', [ + { + name: 'Small', + slug: 'small', + size: 12, + }, + { + name: 'Normal', + slug: 'normal', + size: 16, + }, + { + name: 'Big', + slug: 'big', + size: 26, + }, + ] ); + return ( + + ); +};