Skip to content

Commit

Permalink
docs: add default item props to demo ButtonGroup items
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisvxd committed Oct 17, 2023
1 parent 250d7d5 commit 24ded53
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions apps/demo/config/blocks/ButtonGroup/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const getClassName = getClassNameFactory("ButtonGroup", styles);

export type ButtonGroupProps = {
align?: string;
buttons: { label: string; href: string; variant?: "primary" | "secondary" }[];
buttons: { label: string; href: string; variant: "primary" | "secondary" }[];
};

export const ButtonGroup: ComponentConfig<ButtonGroupProps> = {
Expand All @@ -29,6 +29,11 @@ export const ButtonGroup: ComponentConfig<ButtonGroupProps> = {
],
},
},
defaultItemProps: {
label: "Button",
href: "#",
variant: "primary",
},
},
align: {
type: "radio",
Expand All @@ -39,7 +44,7 @@ export const ButtonGroup: ComponentConfig<ButtonGroupProps> = {
},
},
defaultProps: {
buttons: [{ label: "Learn more", href: "#" }],
buttons: [{ label: "Learn more", href: "#", variant: "primary" }],
},
render: ({ align, buttons }) => {
return (
Expand Down

0 comments on commit 24ded53

Please sign in to comment.