Skip to content

Commit

Permalink
fix: Button text padding
Browse files Browse the repository at this point in the history
  • Loading branch information
cyaiox committed Feb 27, 2025
1 parent cd59d33 commit 1c63b3d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
13 changes: 9 additions & 4 deletions src/admin-toolkit-ui/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ interface CompositeButtonProps
onlyIcon?: boolean
iconTransform?: UiTransformProps
variant?: ButtonVariant
labelTransform?: UiTransformProps
}

export const Button = (props: CompositeButtonProps) => {
Expand All @@ -84,6 +85,7 @@ export const Button = (props: CompositeButtonProps) => {
disabled,
uiBackground,
uiTransform,
labelTransform,
variant = 'primary',
} = props

Expand Down Expand Up @@ -128,9 +130,7 @@ export const Button = (props: CompositeButtonProps) => {
>
{icon && (
<UiEntity
uiTransform={{
...iconTransform,
}}
uiTransform={iconTransform}
uiBackground={{
texture: {
src: icon,
Expand All @@ -140,7 +140,12 @@ export const Button = (props: CompositeButtonProps) => {
/>
)}
{!onlyIcon && !!value ? (
<Label value={value} color={color} fontSize={fontSize} />
<Label
value={value}
color={color}
fontSize={fontSize}
uiTransform={labelTransform}
/>
) : null}
</UiEntity>
)
Expand Down
6 changes: 4 additions & 2 deletions src/admin-toolkit-ui/VideoControl.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -290,11 +290,13 @@ function VideoPlayerSelector({
state.videoControl.selectedVideoPlayer = idx
}}
uiTransform={{
minWidth: 69 * scaleFactor,
alignItems: 'center',
justifyContent: 'center',
alignSelf: 'center',
margin: { right: 8 * scaleFactor },
padding: 0,
}}
labelTransform={{
padding: 4 * scaleFactor,
}}
/>
)
Expand Down

0 comments on commit 1c63b3d

Please sign in to comment.