Skip to content

Commit

Permalink
Do not render font size picker when no font sizes are available and c…
Browse files Browse the repository at this point in the history
…ustom font sizes are disabled. (#13844)
  • Loading branch information
jorgefilipecosta authored Feb 13, 2019
1 parent 26e3255 commit 73683aa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/components/src/font-size-picker/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ function FontSizePicker( {
value,
withSlider = false,
} ) {
if ( disableCustomFontSizes && ! fontSizes.length ) {
return null;
}
const onChangeValue = ( event ) => {
const newValue = event.target.value;
if ( newValue === '' ) {
Expand Down

0 comments on commit 73683aa

Please sign in to comment.