diff --git a/.changeset/short-islands-build.md b/.changeset/short-islands-build.md new file mode 100644 index 000000000..43d477746 --- /dev/null +++ b/.changeset/short-islands-build.md @@ -0,0 +1,5 @@ +--- +'@autoguru/overdrive': patch +--- + +DropDown options get default display flex diff --git a/packages/overdrive/lib/components/DropDown/DropDown.tsx b/packages/overdrive/lib/components/DropDown/DropDown.tsx index 0be6f4412..1edbe02fa 100644 --- a/packages/overdrive/lib/components/DropDown/DropDown.tsx +++ b/packages/overdrive/lib/components/DropDown/DropDown.tsx @@ -17,13 +17,14 @@ import { EPositionerAlignment } from '../Positioner'; import { DropDownOptionsList } from './DropDownOptionsList'; -type ButtonProps = Omit, 'is' | 'children'>; +type ButtonProps = Omit, 'is' | 'children' | 'onClick'>; type FlyoutProps = Pick, 'alignment'>; export interface Props extends ButtonProps, FlyoutProps { children: ReactNode; label: string; icon?: IconType; + onClick?: ComponentProps['onClick']; } export const DropDown = ({ diff --git a/packages/overdrive/lib/components/DropDown/DropDownOption.tsx b/packages/overdrive/lib/components/DropDown/DropDownOption.tsx index ef2856df4..863ec98fd 100644 --- a/packages/overdrive/lib/components/DropDown/DropDownOption.tsx +++ b/packages/overdrive/lib/components/DropDown/DropDownOption.tsx @@ -20,7 +20,9 @@ export const DropDownOption: FunctionComponent = ({ label, icon, className, + display='flex', iconColour = 'dark', + is='button', ...boxProps }) => { const colourStyles = useTextStyles({ colour: iconColour }); @@ -28,8 +30,10 @@ export const DropDownOption: FunctionComponent = ({