Skip to content

Commit

Permalink
fix(button): reduce the thickness of button outline (#376)
Browse files Browse the repository at this point in the history
* fix(button): reduce the thickness of button outline

* fix: restore line endings to default
  • Loading branch information
iamgideonidoko authored Oct 10, 2022
1 parent d2518ad commit 5ef0aef
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/components/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const ButtonComponent: FC<ButtonProps> = ({
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'],
)}
Expand All @@ -89,6 +89,7 @@ const ButtonComponent: FC<ButtonProps> = ({
theme.outline[outline ? 'on' : 'off'],
theme.outline.pill[outline && pill ? 'on' : 'off'],
theme.size[size],
outline && !theme.outline.color[color] && theme.inner.outline,
)}
>
<>
Expand Down
1 change: 1 addition & 0 deletions src/lib/components/Flowbite/FlowbiteTheme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ export interface FlowbiteTheme extends Record<string, unknown> {
inner: {
base: string;
position: PositionInButtonGroup;
outline: string;
};
label: string;
outline: FlowbiteBoolean & {
Expand Down
3 changes: 3 additions & 0 deletions src/lib/theme/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5ef0aef

Please sign in to comment.