diff --git a/packages/components/src/custom-select-control-v2/legacy-component/index.tsx b/packages/components/src/custom-select-control-v2/legacy-component/index.tsx index 89042f075c20a..16d70b3c3106b 100644 --- a/packages/components/src/custom-select-control-v2/legacy-component/index.tsx +++ b/packages/components/src/custom-select-control-v2/legacy-component/index.tsx @@ -64,12 +64,14 @@ function CustomSelectControl( props: LegacyCustomSelectProps ) { const children = options.map( ( { name, key, __experimentalHint, style, className } ) => { const withHint = ( - - { name } - + + + { name } + + { __experimentalHint } - - + + ); return ( diff --git a/packages/components/src/custom-select-control-v2/styles.ts b/packages/components/src/custom-select-control-v2/styles.ts index 09afee1617c98..84b6a3ec5ebbf 100644 --- a/packages/components/src/custom-select-control-v2/styles.ts +++ b/packages/components/src/custom-select-control-v2/styles.ts @@ -130,14 +130,6 @@ const truncateStyles = css` white-space: nowrap; `; -export const ItemHintWrapper = styled.div` - display: flex; - justify-content: space-between; - align-items: center; - flex-wrap: wrap; - flex: 1; -`; - export const SelectedExperimentalHintWrapper = styled.div` ${ truncateStyles } `; @@ -147,11 +139,19 @@ export const SelectedExperimentalHintItem = styled.span` margin-inline-start: ${ space( 2 ) }; `; -export const ItemHintContent = styled.span` +export const WithHintItemWrapper = styled.div` + display: flex; + justify-content: space-between; + align-items: center; + flex-wrap: wrap; + flex: 1; +`; + +export const WithHintItemContent = styled.span` padding-inline-end: ${ space( 4 ) }; `; -export const ItemHint = styled.span` +export const WithHintItemHint = styled.span` // Necessary to override V1 styles passed via the legacy // '.components-custom-select-control__item-hint' class ${ SelectItem } && {