diff --git a/packages/block-editor/src/components/responsive-block-control/test/__snapshots__/index.js.snap b/packages/block-editor/src/components/responsive-block-control/test/__snapshots__/index.js.snap index 7dd76a3e3594c..e0233344f6352 100644 --- a/packages/block-editor/src/components/responsive-block-control/test/__snapshots__/index.js.snap +++ b/packages/block-editor/src/components/responsive-block-control/test/__snapshots__/index.js.snap @@ -1,3 +1,3 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP -exports[`Basic rendering should render with required props 1`] = `"
Padding

Toggle between using the same value for all screen sizes or using a unique value per screen size.

All is used here for testing purposes to ensure we have access to details about the device.

"`; +exports[`Basic rendering should render with required props 1`] = `"
Padding

Toggle between using the same value for all screen sizes or using a unique value per screen size.

All is used here for testing purposes to ensure we have access to details about the device.

"`; diff --git a/packages/components/src/input-control/README.md b/packages/components/src/input-control/README.md index b24b21cc90a39..6af3626a09f1d 100644 --- a/packages/components/src/input-control/README.md +++ b/packages/components/src/input-control/README.md @@ -52,6 +52,13 @@ If this property is added, a label will be generated using label property as the - Type: `String` - Required: No +### labelPosition + +The position of the label (`top`, `side`, or `bottom`). + +- Type: `String` +- Required: No + ### onChange A function that receives the value of the input. diff --git a/packages/components/src/number-control/README.md b/packages/components/src/number-control/README.md index 1d225590bbadc..36b21f63a40a8 100644 --- a/packages/components/src/number-control/README.md +++ b/packages/components/src/number-control/README.md @@ -63,6 +63,20 @@ If true, pressing `UP` or `DOWN` along with the `SHIFT` key will increment the v - Required: No - Default: `true` +### label + +If this property is added, a label will be generated using label property as the content. + +- Type: `String` +- Required: No + +### labelPosition + +The position of the label (`top`, `side`, or `bottom`). + +- Type: `String` +- Required: No + ### shiftStep Amount to increment by when the `SHIFT` key is held down. This shift value is a multiplier to the `step` value. For example, if the `step` value is `5`, and `shiftStep` is `10`, each jump would increment/decrement by `50`. diff --git a/packages/components/src/select-control/README.md b/packages/components/src/select-control/README.md index 83073594c1dce..db035549ce2fa 100644 --- a/packages/components/src/select-control/README.md +++ b/packages/components/src/select-control/README.md @@ -131,6 +131,12 @@ If this property is added, a label will be generated using label property as the - Type: `String` - Required: No +#### labelPosition + +The position of the label (`top`, `side`, or `bottom`). +- Type: `String` +- Required: No + #### hideLabelFromVision If true, the label will only be visible to screen readers. diff --git a/packages/components/src/select-control/index.js b/packages/components/src/select-control/index.js index ee3b238d75e28..d6133929e00a5 100644 --- a/packages/components/src/select-control/index.js +++ b/packages/components/src/select-control/index.js @@ -40,7 +40,7 @@ function SelectControl( options = [], size = 'default', value: valueProp, - labelPosition, + labelPosition = 'top', ...props }, ref diff --git a/packages/components/src/select-control/stories/index.js b/packages/components/src/select-control/stories/index.js index 80a71605df1c3..83ce2e67923bf 100644 --- a/packages/components/src/select-control/stories/index.js +++ b/packages/components/src/select-control/stories/index.js @@ -36,6 +36,15 @@ export const _default = () => { help: text( 'help', 'Help text to explain the select control.' ), hideLabelFromVision: boolean( 'hideLabelFromVision', false ), label: text( 'label', 'Value' ), + labelPosition: select( + 'labelPosition', + { + top: 'top', + side: 'side', + bottom: 'bottom', + }, + 'top' + ), multiple: boolean( 'multiple', false ), options: object( 'Options', [ { value: null, label: 'Select an Option', disabled: true }, diff --git a/packages/components/src/unit-control/README.md b/packages/components/src/unit-control/README.md index b442a5ef25139..b07685ba3d384 100644 --- a/packages/components/src/unit-control/README.md +++ b/packages/components/src/unit-control/README.md @@ -33,6 +33,20 @@ Determines if the unit `