Skip to content

Commit

Permalink
feat: Defaults DropDown options display value to flex (#951)
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-zahedi authored Nov 7, 2023
1 parent 7778838 commit 9567e4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/short-islands-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@autoguru/overdrive': patch
---

DropDown options get default display flex
3 changes: 2 additions & 1 deletion packages/overdrive/lib/components/DropDown/DropDown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,14 @@ import { EPositionerAlignment } from '../Positioner';

import { DropDownOptionsList } from './DropDownOptionsList';

type ButtonProps = Omit<ComponentProps<typeof Button>, 'is' | 'children'>;
type ButtonProps = Omit<ComponentProps<typeof Button>, 'is' | 'children' | 'onClick'>;
type FlyoutProps = Pick<ComponentProps<typeof Flyout>, 'alignment'>;

export interface Props extends ButtonProps, FlyoutProps {
children: ReactNode;
label: string;
icon?: IconType;
onClick?: ComponentProps<typeof Button>['onClick'];
}

export const DropDown = ({
Expand Down
4 changes: 4 additions & 0 deletions packages/overdrive/lib/components/DropDown/DropDownOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,20 @@ export const DropDownOption: FunctionComponent<Props> = ({
label,
icon,
className,
display='flex',
iconColour = 'dark',
is='button',
...boxProps
}) => {
const colourStyles = useTextStyles({ colour: iconColour });
return (
<Box
className={[styles.root, className]}
{...boxProps}
display={display}
paddingX="3"
paddingY="2"
is={is}
>
<Inline
noWrap
Expand Down

0 comments on commit 9567e4a

Please sign in to comment.