Skip to content

Commit

Permalink
chore: update Optionlist layout
Browse files Browse the repository at this point in the history
  • Loading branch information
kyledurand committed Mar 6, 2024
1 parent b4ef876 commit 47793ab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ $control-vertical-adjustment: 2px;

display: flex;
flex-wrap: nowrap;
justify-content: space-between;
gap: var(--p-space-200);

// stylelint-disable-next-line selector-max-specificity -- required for focus-visible support
&.focused:focus-visible:not(:active) {
Expand Down Expand Up @@ -141,10 +141,8 @@ $control-vertical-adjustment: 2px;
}

.Icon {
margin-left: var(--p-space-200);

svg {
fill: var(--p-color-icon-brand);
// fill: var(--p-color-icon-brand);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {classNames, variationName} from '../../../../utilities/css';
import type {InlineStackProps} from '../../../InlineStack';
import {InlineStack} from '../../../InlineStack';
import {Checkbox as PolarisCheckbox} from '../../../Checkbox';
import {Box} from '../../../Box';

import styles from './Option.module.scss';

Expand Down Expand Up @@ -125,20 +126,20 @@ export function Option({
onBlur={toggleFocused}
aria-pressed={active || select}
>
<>
<InlineStack
wrap={false}
blockAlign={verticalAlignToBlockAlign(verticalAlign)}
>
{mediaMarkup}
{label}
</InlineStack>
{(select || active) && (
<span className={styles.Icon}>
<Icon source={CheckIcon} />
</span>
)}
</>
{select || active ? (
<span className={styles.Icon}>
<Icon source={CheckIcon} tone="base" />
</span>
) : (
<Box width="20px" />
)}
<InlineStack
wrap={false}
blockAlign={verticalAlignToBlockAlign(verticalAlign)}
>
{mediaMarkup}
{label}
</InlineStack>
</button>
);

Expand Down

0 comments on commit 47793ab

Please sign in to comment.