From 89c1d02c570513e90c6f5648e6079c818c2f47a7 Mon Sep 17 00:00:00 2001 From: Brent Swisher Date: Mon, 28 Oct 2019 18:20:26 -0400 Subject: [PATCH] Add FontSizePicker component to Storybook --- .../src/font-size-picker/stories/index.js | 65 +++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 packages/components/src/font-size-picker/stories/index.js 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..c6953ca8c2e45c --- /dev/null +++ b/packages/components/src/font-size-picker/stories/index.js @@ -0,0 +1,65 @@ +/** + * 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 ); + const fontSizes = [ + { + name: 'Small', + slug: 'small', + size: 12, + }, + { + name: 'Normal', + slug: 'normal', + size: 16, + }, + { + name: 'Big', + slug: 'big', + size: 26, + }, + ]; + const fallbackFontSize = 16; + + return ( + + ); +}; + +export const _default = () => { + return ( + + ); +}; + +export const withSlider = () => { + return ( + + ); +}; + +export const withoutCustomSizes = () => { + return ( + + ); +};