Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(button): reduce the thickness of button outline #376

Merged
merged 2 commits into from
Oct 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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