From 6fcf4a240a96b397f3492747c9fe0b1467b9f0fc Mon Sep 17 00:00:00 2001 From: Marco Perrando Date: Wed, 18 Sep 2024 14:58:04 +0200 Subject: [PATCH 1/2] Disclosure: config title spacing. --- .../src/Disclosure/Config.ts | 1 + .../src/Disclosure/Disclosure.tsx | 2 +- .../src/util/defaultConfigs.tsx | 1 + .../stories/Utils/withBentoConfig.stories.tsx | 25 ++++++++++++++++++- 4 files changed, 27 insertions(+), 2 deletions(-) diff --git a/packages/bento-design-system/src/Disclosure/Config.ts b/packages/bento-design-system/src/Disclosure/Config.ts index 3e2ca351d..d87310648 100644 --- a/packages/bento-design-system/src/Disclosure/Config.ts +++ b/packages/bento-design-system/src/Disclosure/Config.ts @@ -5,6 +5,7 @@ import { Children } from "../util/Children"; import { DisclosureProps } from "./Disclosure"; export type DisclosureConfig = { + titleSpacing: BentoSprinkles["gap"]; internalSpacing: BentoSprinkles["gap"]; titleSize: { 1: TitleProps["size"]; diff --git a/packages/bento-design-system/src/Disclosure/Disclosure.tsx b/packages/bento-design-system/src/Disclosure/Disclosure.tsx index 0a1ae037d..d68f8d2d7 100644 --- a/packages/bento-design-system/src/Disclosure/Disclosure.tsx +++ b/packages/bento-design-system/src/Disclosure/Disclosure.tsx @@ -46,7 +46,7 @@ export function Disclosure({ const icon = open ? config.icons.open : config.icons.closed; return ( - + { ); }; + +export const ConfiguredDisclosure = () => { + const Disclosure = withBentoConfig( + { + disclosure: { + titleSpacing: 0, + }, + }, + BentoDisclosure + ); + + return ( + + + + ); +}; From 8a37dd2b57ade68785468e796f31a764352e6a5c Mon Sep 17 00:00:00 2001 From: Vincenzo Guerrisi Date: Thu, 19 Sep 2024 12:41:47 +0200 Subject: [PATCH 2/2] improve configured Disclosure story --- .../stories/Utils/withBentoConfig.stories.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/bento-design-system/stories/Utils/withBentoConfig.stories.tsx b/packages/bento-design-system/stories/Utils/withBentoConfig.stories.tsx index c593554d1..085ec57c1 100644 --- a/packages/bento-design-system/stories/Utils/withBentoConfig.stories.tsx +++ b/packages/bento-design-system/stories/Utils/withBentoConfig.stories.tsx @@ -63,7 +63,7 @@ export const ConfiguredDisclosure = () => { ); return ( - + );