diff --git a/packages/block-editor/src/components/font-appearance-control/index.js b/packages/block-editor/src/components/font-appearance-control/index.js index d4c9dc85715d2..b7cc441dc3c00 100644 --- a/packages/block-editor/src/components/font-appearance-control/index.js +++ b/packages/block-editor/src/components/font-appearance-control/index.js @@ -206,6 +206,7 @@ export default function FontAppearanceControl( props ) { hasStylesOrWeights && ( diff --git a/packages/components/src/custom-select-control/stories/index.js b/packages/components/src/custom-select-control/stories/index.js index 7b8b07a2c7d00..430821074617e 100644 --- a/packages/components/src/custom-select-control/stories/index.js +++ b/packages/components/src/custom-select-control/stories/index.js @@ -6,6 +6,12 @@ import CustomSelectControl from '../'; export default { title: 'Components/CustomSelectControl', component: CustomSelectControl, + argTypes: { + __unstableSize: { + options: [ 'default', 'large' ], + control: { type: 'select' }, + }, + }, }; const defaultOptions = [ @@ -31,29 +37,31 @@ const defaultOptions = [ style: { fontSize: '300%' }, }, ]; -export const _default = () => ( - -); -const longLabelOptions = [ - { - key: 'reallylonglabel1', - name: 'Really long labels are good for stress testing', - }, - { - key: 'reallylonglabel2', - name: 'But they can take a long time to type.', - }, - { - key: 'reallylonglabel3', - name: - 'That really is ok though because you should stress test your UIs.', - }, -]; +export const Default = CustomSelectControl.bind( {} ); +Default.args = { + hideLabelFromVision: false, + label: 'Font size', + options: defaultOptions, +}; -export const longLabels = () => ( - -); +export const LongLabels = CustomSelectControl.bind( {} ); +LongLabels.args = { + ...Default.args, + label: 'Testing long labels', + options: [ + { + key: 'reallylonglabel1', + name: 'Really long labels are good for stress testing', + }, + { + key: 'reallylonglabel2', + name: 'But they can take a long time to type.', + }, + { + key: 'reallylonglabel3', + name: + 'That really is ok though because you should stress test your UIs.', + }, + ], +}; diff --git a/packages/components/src/custom-select-control/style.scss b/packages/components/src/custom-select-control/style.scss index f3175331336bf..0033c00e0d0e3 100644 --- a/packages/components/src/custom-select-control/style.scss +++ b/packages/components/src/custom-select-control/style.scss @@ -15,6 +15,11 @@ position: relative; text-align: left; + &.is-unstable-size-large { + min-height: 40px; + padding-left: 16px; + } + // For all button sizes allow sufficient space for the // dropdown "arrow" icon to display. &.components-custom-select-control__button { diff --git a/packages/components/src/font-size-picker/index.js b/packages/components/src/font-size-picker/index.js index 548eb2265f508..572b376fb34e1 100644 --- a/packages/components/src/font-size-picker/index.js +++ b/packages/components/src/font-size-picker/index.js @@ -28,6 +28,7 @@ import { function FontSizePicker( { + __unstableSize, fallbackFontSize, fontSizes = [], disableCustomFontSizes = false, @@ -148,6 +149,7 @@ function FontSizePicker( shouldUseSelectControl && ! showCustomValueControl && ( { isShownByDefault={ true } >