♻️(react) merge duplicated scss classes related to accessibility
'offscreen' and 'c__offscreen' were duplicated, merge these two classes in a dedicated utils file.
This commit is contained in:
committed by
aleb_the_flash
parent
b714c3d543
commit
d5fcf500b7
@@ -33,7 +33,7 @@ export const LabelledBox = ({
|
||||
<label
|
||||
className={classNames("labelled-box__label", {
|
||||
placeholder: labelAsPlaceholder,
|
||||
offscreen: hideLabel,
|
||||
c__offscreen: hideLabel,
|
||||
})}
|
||||
htmlFor={htmlFor}
|
||||
id={labelId}
|
||||
|
||||
@@ -1569,7 +1569,7 @@ describe("<Select/>", () => {
|
||||
name: "City",
|
||||
});
|
||||
const label = screen.getByText("City")!.parentElement!;
|
||||
expect(Array.from(label.classList)).toContain("offscreen");
|
||||
expect(Array.from(label.classList)).toContain("c__offscreen");
|
||||
});
|
||||
|
||||
it("renders menu empty placeholder when there are no options to display", async () => {
|
||||
|
||||
@@ -726,7 +726,7 @@ describe("<Select multi={true} />", () => {
|
||||
name: "Cities",
|
||||
});
|
||||
const label = screen.getByText("Cities")!.parentElement!;
|
||||
expect(Array.from(label.classList)).toContain("offscreen");
|
||||
expect(Array.from(label.classList)).toContain("c__offscreen");
|
||||
});
|
||||
|
||||
it("is possible to select again the last deleted item", async () => {
|
||||
|
||||
Reference in New Issue
Block a user