Show Share initials, a readable link, and a copy confirmation.
Filled avatars used white ink on yellow, the link field was a dimmed disabled input, and Copy failed silently when the clipboard API was denied.
This commit is contained in:
1 parent
3a264ac2df
commit
0fe2624002
11 files changed
+132
-14
No files matched your search
@@ -81,4 +81,19 @@ describe("TextInput (size tests)", () => {
|
||||
expect(input).toBeRequired();
|
||||
expect(input).toHaveAttribute("form", "create-flow-community-save");
|
||||
});
|
||||
|
||||
it("keeps read-only values at full contrast", () => {
|
||||
const { container } = render(
|
||||
<TextInput
|
||||
label="Share link"
|
||||
value="communityrule.info/r/k7f2-9qxm"
|
||||
readOnly
|
||||
/>,
|
||||
);
|
||||
const input = container.querySelector("input");
|
||||
expect(input).toHaveAttribute("readonly");
|
||||
expect(input).not.toBeDisabled();
|
||||
expect(input).toHaveClass("text-[var(--color-content-default-primary)]");
|
||||
expect(container.querySelector(".opacity-40")).not.toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user