Skip to content

Commit e94cc3c

Browse files
authored
Merge pull request #300 from buildo/293-add_iconsize_to_disclosure
2 parents 94bb2a0 + aaeb6d0 commit e94cc3c

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

packages/bento-design-system/src/Disclosure/Config.ts

+4
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,8 @@ export type DisclosureConfig = {
1515
open: (props: IconProps) => Children;
1616
closed: (props: IconProps) => Children;
1717
};
18+
iconSize: {
19+
1: IconProps["size"];
20+
2: IconProps["size"];
21+
};
1822
};

packages/bento-design-system/src/Disclosure/createDisclosure.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export function createDisclosure(config: DisclosureConfig) {
6868
reverse={iconPosition === "trailing"}
6969
>
7070
<Column width="content">
71-
{icon({ size: 16, color: level === 1 ? "primary" : "secondary" })}
71+
{icon({ size: config.iconSize[level], color: level === 1 ? "primary" : "secondary" })}
7272
</Column>
7373
<Title size={config.titleSize[level]} color={level === 1 ? "default" : "secondary"}>
7474
{title}

packages/bento-design-system/src/util/defaultConfigs.tsx

+4
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,10 @@ export const disclosure: DisclosureConfig = {
168168
open: IconChevronUp,
169169
closed: IconChevronDown,
170170
},
171+
iconSize: {
172+
1: 16,
173+
2: 16,
174+
},
171175
};
172176

173177
export const disclosureGroup: DisclosureGroupConfig = {

0 commit comments

Comments
 (0)