Skip to content

Commit

Permalink
Revert "SelectControl: Add story for prefix slot (WordPress#65730)"
Browse files Browse the repository at this point in the history
This reverts commit de28b06.
  • Loading branch information
huubl authored Oct 2, 2024
1 parent 13fde62 commit 6526c82
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions packages/components/src/select-control/stories/index.story.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useState } from '@wordpress/element';
* Internal dependencies
*/
import SelectControl from '../';
import { InputControlPrefixWrapper } from '../../input-control/input-prefix-wrapper';

const meta: Meta< typeof SelectControl > = {
title: 'Components/SelectControl',
Expand Down Expand Up @@ -65,7 +64,6 @@ const SelectControlWithState: StoryFn< typeof SelectControl > = ( props ) => {
export const Default = SelectControlWithState.bind( {} );
Default.args = {
__nextHasNoMarginBottom: true,
label: 'Label',
options: [
{ value: '', label: 'Select an Option', disabled: true },
{ value: 'a', label: 'Option A' },
Expand All @@ -78,6 +76,7 @@ export const WithLabelAndHelpText = SelectControlWithState.bind( {} );
WithLabelAndHelpText.args = {
...Default.args,
help: 'Help text to explain the select control.',
label: 'Value',
};

/**
Expand All @@ -87,7 +86,6 @@ WithLabelAndHelpText.args = {
export const WithCustomChildren = SelectControlWithState.bind( {} );
WithCustomChildren.args = {
__nextHasNoMarginBottom: true,
label: 'Label',
children: (
<>
<option value="option-1">Option 1</option>
Expand All @@ -106,19 +104,8 @@ WithCustomChildren.args = {
),
};

/**
* By default, the prefix is aligned with the edge of the input border, with no padding.
* If you want to apply standard padding in accordance with the size variant, wrap the element in the `<InputControlPrefixWrapper>` component.
*/
export const WithPrefix = SelectControlWithState.bind( {} );
WithPrefix.args = {
...Default.args,
prefix: <InputControlPrefixWrapper>Prefix:</InputControlPrefixWrapper>,
};

export const Minimal = SelectControlWithState.bind( {} );
Minimal.args = {
...Default.args,
variant: 'minimal',
hideLabelFromVision: true,
};

0 comments on commit 6526c82

Please sign in to comment.