From 5cf39907e1ef04441ca6babb9153dcbec1556f17 Mon Sep 17 00:00:00 2001 From: Gideon Idoko Date: Mon, 10 Oct 2022 09:37:44 +0100 Subject: [PATCH 1/2] fix(button): reduce the thickness of button outline --- src/lib/components/Button/index.tsx | 3 ++- src/lib/components/Flowbite/FlowbiteTheme.ts | 1 + src/lib/theme/default.ts | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lib/components/Button/index.tsx b/src/lib/components/Button/index.tsx index 428980c84..307ffab55 100644 --- a/src/lib/components/Button/index.tsx +++ b/src/lib/components/Button/index.tsx @@ -73,7 +73,7 @@ const ButtonComponent: FC = ({ gradientDuoTone && !gradientMonochrome && theme.gradientDuoTone[gradientDuoTone], !gradientDuoTone && gradientMonochrome && theme.gradient[gradientMonochrome], groupTheme.position[positionInGroup], - outline && theme.outline.color[color], + outline && (theme.outline.color[color] ?? theme.outline.color.default), theme.base, theme.pill[pill ? 'on' : 'off'], )} @@ -89,6 +89,7 @@ const ButtonComponent: FC = ({ theme.outline[outline ? 'on' : 'off'], theme.outline.pill[outline && pill ? 'on' : 'off'], theme.size[size], + outline && !theme.outline.color[color] && theme.inner.outline )} > <> diff --git a/src/lib/components/Flowbite/FlowbiteTheme.ts b/src/lib/components/Flowbite/FlowbiteTheme.ts index b7836a3bc..204a18306 100644 --- a/src/lib/components/Flowbite/FlowbiteTheme.ts +++ b/src/lib/components/Flowbite/FlowbiteTheme.ts @@ -113,6 +113,7 @@ export interface FlowbiteTheme extends Record { inner: { base: string; position: PositionInButtonGroup; + outline: string; }; label: string; outline: FlowbiteBoolean & { diff --git a/src/lib/theme/default.ts b/src/lib/theme/default.ts index a94d07e2b..f8acd942c 100644 --- a/src/lib/theme/default.ts +++ b/src/lib/theme/default.ts @@ -190,12 +190,15 @@ const theme: FlowbiteTheme = { middle: '!rounded-none', end: 'rounded-l-none', }, + outline: 'border border-transparent' }, label: 'ml-2 inline-flex h-4 w-4 items-center justify-center rounded-full bg-blue-200 text-xs font-semibold text-blue-800', outline: { color: { gray: 'border border-gray-900 dark:border-white', + default: 'border-0', + light: '', }, off: '', on: 'bg-white text-gray-900 transition-all duration-75 ease-in group-hover:bg-opacity-0 group-hover:text-inherit dark:bg-gray-900 dark:text-white', From 9e83cdce6490194103eaa124ecb69d17fd5fc588 Mon Sep 17 00:00:00 2001 From: Gideon Idoko Date: Mon, 10 Oct 2022 14:26:12 +0100 Subject: [PATCH 2/2] fix: restore line endings to default --- src/lib/components/Button/index.tsx | 2 +- src/lib/theme/default.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/Button/index.tsx b/src/lib/components/Button/index.tsx index 307ffab55..8512be95d 100644 --- a/src/lib/components/Button/index.tsx +++ b/src/lib/components/Button/index.tsx @@ -89,7 +89,7 @@ const ButtonComponent: FC = ({ theme.outline[outline ? 'on' : 'off'], theme.outline.pill[outline && pill ? 'on' : 'off'], theme.size[size], - outline && !theme.outline.color[color] && theme.inner.outline + outline && !theme.outline.color[color] && theme.inner.outline, )} > <> diff --git a/src/lib/theme/default.ts b/src/lib/theme/default.ts index f8acd942c..d366df08c 100644 --- a/src/lib/theme/default.ts +++ b/src/lib/theme/default.ts @@ -190,7 +190,7 @@ const theme: FlowbiteTheme = { middle: '!rounded-none', end: 'rounded-l-none', }, - outline: 'border border-transparent' + outline: 'border border-transparent', }, label: 'ml-2 inline-flex h-4 w-4 items-center justify-center rounded-full bg-blue-200 text-xs font-semibold text-blue-800',