Skip to content

Commit c2fff36

Browse files
fix(ui): Update ClipboardInput positioning and change from disabled to readonly (#8593)
1 parent 75e5d25 commit c2fff36

2 files changed

Lines changed: 15 additions & 5 deletions

File tree

.changeset/qcwt-pcxyt-vbpuw.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@clerk/ui': patch
3+
---
4+
5+
Improve ClipboardInput positioning and accessibility by using `readOnly` instead of `isDisabled`

packages/ui/src/elements/ClipboardInput.tsx

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,22 @@ export const ClipboardInput = (props: ClipboardInputProps) => {
2323
<Input
2424
{...rest}
2525
value={value}
26-
isDisabled
27-
sx={theme => ({ paddingInlineEnd: theme.space.$8 })}
26+
readOnly
27+
sx={theme => ({ paddingInlineEnd: theme.space.$7x5, textOverflow: 'ellipsis' })}
2828
/>
2929

3030
<Button
3131
elementDescriptor={descriptors.formFieldInputCopyToClipboardButton}
3232
variant='ghost'
3333
onClick={() => onCopy()}
34-
sx={{
35-
position: 'absolute',
36-
insetInlineEnd: 0,
34+
sx={t => {
35+
return {
36+
position: 'absolute',
37+
padding: 0,
38+
insetInlineEnd: t.space.$0x5,
39+
insetBlock: t.space.$0x5,
40+
aspectRatio: 1,
41+
};
3742
}}
3843
>
3944
<Icon

0 commit comments

Comments
 (0)