Skip to content

Commit e53ca63

Browse files
committed
handle simple theme spacing
1 parent f0195f9 commit e53ca63

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

packages/ui/src/baseTheme.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,14 @@ const clerkTheme: Appearance = {
305305
borderWidth: 0,
306306
boxShadow: `0px 0px 2px 0px rgba(0, 0, 0, 0.08), 0px 1px 2px 0px rgba(25, 28, 33, 0.12), 0px 0px 0px 1px ${theme.colors.$borderAlpha100}`,
307307
},
308+
formFieldInputShowPasswordButton: {
309+
insetInlineEnd: theme.space.$0x75,
310+
insetBlock: theme.space.$0x75,
311+
borderRadius: `calc(${theme.radii.$md} - ${theme.space.$0x75})`,
312+
'&::before': {
313+
inset: `calc(${theme.space.$0x75} * -1)`,
314+
},
315+
},
308316
};
309317
},
310318
} satisfies Appearance;

packages/ui/src/elements/PasswordInput.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,15 +114,15 @@ export const PasswordInput = forwardRef<HTMLInputElement, PasswordInputProps>((p
114114
onClick={() => setHidden(s => !s)}
115115
sx={theme => ({
116116
position: 'absolute',
117-
insetInlineEnd: theme.space.$0x75,
118-
insetBlock: theme.space.$0x75,
119-
borderRadius: theme.radii.$sm,
117+
insetInlineEnd: theme.space.$1,
118+
insetBlock: theme.space.$1,
119+
borderRadius: `calc(${theme.radii.$md} - ${theme.space.$1})`,
120120
color: theme.colors.$neutralAlpha400,
121121
paddingInline: theme.space.$2,
122122
'&::before': {
123123
content: '""',
124124
position: 'absolute',
125-
inset: `calc(${theme.space.$0x75} * -1)`,
125+
inset: `calc(${theme.space.$1} * -1)`,
126126
display: 'block',
127127
borderRadius: theme.radii.$md,
128128
},

0 commit comments

Comments
 (0)