From 51b4268a136fff557aa460d3bb7c45caebf9fdcd Mon Sep 17 00:00:00 2001 From: Federico Ercoles Date: Mon, 22 Apr 2024 14:32:28 +0200 Subject: [PATCH] Allow config of internal padding and range separator size in DateField --- packages/bento-design-system/src/DateField/Config.ts | 2 ++ packages/bento-design-system/src/DateField/Input.tsx | 7 +++++-- packages/bento-design-system/src/util/defaultConfigs.tsx | 2 ++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/packages/bento-design-system/src/DateField/Config.ts b/packages/bento-design-system/src/DateField/Config.ts index 22181720c..071579460 100644 --- a/packages/bento-design-system/src/DateField/Config.ts +++ b/packages/bento-design-system/src/DateField/Config.ts @@ -8,7 +8,9 @@ import { Children } from "../util/Children"; export type DateFieldConfig = { radius: BorderRadiusConfig; padding: NonNullable; + internalPadding: NonNullable; elevation: "none" | "small" | "medium" | "large"; + rangeSeparatorSize: IconProps["size"]; monthYearLabelSize: LabelProps["size"]; dayOfWeekLabelSize: LabelProps["size"]; previousMonthIcon: (props: IconProps) => Children; diff --git a/packages/bento-design-system/src/DateField/Input.tsx b/packages/bento-design-system/src/DateField/Input.tsx index e3ab6c1fd..c14d50cfa 100644 --- a/packages/bento-design-system/src/DateField/Input.tsx +++ b/packages/bento-design-system/src/DateField/Input.tsx @@ -82,6 +82,7 @@ function DateField({ fieldProps }: { fieldProps: AriaDateFieldOptions ) : ( - + - + + + diff --git a/packages/bento-design-system/src/util/defaultConfigs.tsx b/packages/bento-design-system/src/util/defaultConfigs.tsx index ee30dbf13..6fb8886b8 100644 --- a/packages/bento-design-system/src/util/defaultConfigs.tsx +++ b/packages/bento-design-system/src/util/defaultConfigs.tsx @@ -677,7 +677,9 @@ export const tooltip: TooltipConfig = { export const dateField: DateFieldConfig = { radius: 24, padding: 24, + internalPadding: 16, elevation: "medium", + rangeSeparatorSize: 24, monthYearLabelSize: "large", dayOfWeekLabelSize: "large", previousMonthIcon: IconChevronLeft,