Skip to content

Commit

Permalink
More renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Jul 1, 2024
1 parent 01d3d85 commit 4c012ec
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,14 @@ function CustomSelectControl( props: LegacyCustomSelectProps ) {
const children = options.map(
( { name, key, __experimentalHint, style, className } ) => {
const withHint = (
<Styled.ItemHintWrapper>
<Styled.ItemHintContent>{ name }</Styled.ItemHintContent>
<Styled.ItemHint className="components-custom-select-control__item-hint">
<Styled.WithHintItemWrapper>
<Styled.WithHintItemContent>
{ name }
</Styled.WithHintItemContent>
<Styled.WithHintItemHint className="components-custom-select-control__item-hint">
{ __experimentalHint }
</Styled.ItemHint>
</Styled.ItemHintWrapper>
</Styled.WithHintItemHint>
</Styled.WithHintItemWrapper>
);

return (
Expand Down
20 changes: 10 additions & 10 deletions packages/components/src/custom-select-control-v2/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 }
`;
Expand All @@ -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 } && {
Expand Down

0 comments on commit 4c012ec

Please sign in to comment.