diff --git a/polaris-react/src/components/OptionList/OptionList.stories.tsx b/polaris-react/src/components/OptionList/OptionList.stories.tsx index 7e1dfc390d5..82df5c57098 100644 --- a/polaris-react/src/components/OptionList/OptionList.stories.tsx +++ b/polaris-react/src/components/OptionList/OptionList.stories.tsx @@ -21,11 +21,13 @@ export default { export function Default() { const [selected, setSelected] = useState([]); + const handleChange = useCallback((value) => setSelected(value), []); + return ( setSelected(value), []); + return ( setSelected(value), []); + return ( setSelected(value), []); + const togglePopoverActive = useCallback( () => setPopoverActive((popoverActive) => !popoverActive), [], @@ -125,18 +133,16 @@ export function InAPopover() { > setSelected(value), []); + return ( { const isFirstOption = sectionIndex === 0; const sectionPaddingBlockStart = polarisSummerEditions2023 ? '3' : '4'; + const firstOptionBlockStartPadding = polarisSummerEditions2023 + ? '05' + : '2'; const titleLevel = isFirstOption ? 'h2' : 'h3'; const titleMarkup = title ? ( ); + // eslint-disable-next-line no-nested-ternary + const blockStartPadding = isFirstOption + ? // eslint-disable-next-line no-nested-ternary + polarisSummerEditions2023 + ? title + ? '1' + : '0' + : undefined + : // eslint-disable-next-line no-nested-ternary + polarisSummerEditions2023 + ? title + ? '05' + : '0' + : '2'; + return ( {polarisSummerEditions2023 ? ( - + {titleMarkup} {option} diff --git a/polaris-react/src/components/OptionList/components/Option/Option.scss b/polaris-react/src/components/OptionList/components/Option/Option.scss index ffe724c189e..373a7b2d2c4 100644 --- a/polaris-react/src/components/OptionList/components/Option/Option.scss +++ b/polaris-react/src/components/OptionList/components/Option/Option.scss @@ -81,6 +81,12 @@ $control-vertical-adjustment: 2px; display: flex; flex-wrap: nowrap; justify-content: space-between; + + &.select, + &.select:hover:not(.disabled), + &.active { + font-weight: var(--p-font-weight-semibold); + } } }