Skip to content

Commit

Permalink
fix: outlined button (#54)
Browse files Browse the repository at this point in the history
fix: reduce form label font size
  • Loading branch information
bentatum authored Oct 18, 2024
1 parent 2104a6d commit 62ebde1
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/twelve-poets-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@verysimple/react": patch
---

fix: outline button broken x padding
2 changes: 1 addition & 1 deletion packages/react/src/FormLabel/FormLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const FormLabel: FC<FormLabelProps> = forwardRef(
className={clsx(
"block",
{
"text-sm": !className?.includes("text-"),
"text-xs": !className?.includes("text-"),
"mb-1.5": !className?.includes("mb-")
},
className
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`FormLabel should match the snapshot 1`] = `
<div>
<label
class="block text-sm mb-1.5"
class="block text-xs mb-1.5"
>
test
</label>
Expand Down
6 changes: 6 additions & 0 deletions packages/react/src/OutlinedButton/OutlinedButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ export const OutlinedButton = forwardRef<
size = "md",
children,
as = "button",
className,
...props
},
ref
Expand All @@ -31,6 +32,11 @@ export const OutlinedButton = forwardRef<
size={size}
color={color}
disabled={disabled}
className={clsx(
fieldPaddingClassNames(size),
"w-full flex items-center justify-center",
className
)}
{...props}
>
{children}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ exports[`OutlinedButton can render as a custom component when primary and disabl
exports[`OutlinedButton should have an outline 1`] = `
<div>
<button
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed inline-flex items-center justify-center rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-content"
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-border px-4 w-full flex items-center justify-center"
tabindex="0"
>
Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const OutlinedButtonBase: FC<OutlinedButtonBaseProps> = forwardRef<
fieldSizeClassNames(size),
!hasBorderColor && colorClasses[color],
// this keeps the size consistent with inputs
"box-content",
"box-border",
className
)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`OutlinedButtonBase should have an outline 1`] = `
<div>
<button
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed inline-flex items-center justify-center rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-content"
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed inline-flex items-center justify-center rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-border"
tabindex="0"
>
Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
exports[`OutlinedIconButton should have an outline 1`] = `
<div>
<button
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed inline-flex items-center justify-center rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-content min-w-[48px]"
class="focus:outline-none cursor-pointer disabled:cursor-not-allowed inline-flex items-center justify-center rounded border shadow hover:shadow disabled:shadow-none transition-shadow ease-in duration-100 whitespace-nowrap font-bold text-base min-h-[44px] border box-border min-w-[48px]"
tabindex="0"
>
Test
Expand Down

0 comments on commit 62ebde1

Please sign in to comment.