Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Updated FontSizePicker on v-4.1.1
  • Loading branch information
ruhel241 authored Nov 2, 2018
commit 199519fa80612f480040502718b743792c2f57c3
7 changes: 1 addition & 6 deletions packages/components/src/font-size-picker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,16 @@ The component renders a series of buttons that allow the user to select predefin


```jsx
import { FontSizePicker } from '@wordpress/components';
import { FontSizePicker } from '@wordpress/editor';
import { withState } from '@wordpress/compose';

const MyFontSizePicker = withState( {
fontSize: 16,
} )( ( { fontSize, setState } ) => {
const fontSizes = [
{ shortName: 'S', size: 12 },
{ shortName: 'M', size: 16 }
];
const fallbackFontSize = 16;

return (
<FontSizePicker
fontSizes={ fontSizes }
value={ fontSize }
fallbackFontSize={ fallbackFontSize }
onChange={ fontSize => setState( { fontSize } ) }
Expand Down