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 and youknowriad committed Mar 6, 2019
1 parent ffcf4eb commit cd1134f
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 cd1134f

Please sign in to comment.