diff --git a/packages/orbit-components/src/Tag/Tag.ct-story.tsx b/packages/orbit-components/src/Tag/Tag.ct-story.tsx index 2f4198102d..5d76a6b3b9 100644 --- a/packages/orbit-components/src/Tag/Tag.ct-story.tsx +++ b/packages/orbit-components/src/Tag/Tag.ct-story.tsx @@ -28,6 +28,9 @@ export function DefaultTestStory() { {}} onClick={() => {}}> Selected Removable + {}} iconLeft={}> + Removable with icon +

Colored

@@ -47,6 +50,9 @@ export function DefaultTestStory() { {}} onClick={() => {}}> Selected Removable + {}} iconLeft={}> + Removable with icon +

dateTag

@@ -76,6 +82,9 @@ export function DefaultTestStory() { {}}> Small removable + {}} iconLeft={}> + Small removable with icon +
); diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx b/packages/orbit-components/src/Tag/Tag.ct.tsx index 6e52bbfa90..35449aa98b 100644 --- a/packages/orbit-components/src/Tag/Tag.ct.tsx +++ b/packages/orbit-components/src/Tag/Tag.ct.tsx @@ -2,6 +2,7 @@ import * as React from "react"; import { test, expect } from "@playwright/experimental-ct-react"; import { TestTag, DefaultTestStory } from "./Tag.ct-story"; +import RenderInRtl from "../utils/rtl/RenderInRtl"; const NON_INTERACTABLE_TAGS = [ { @@ -87,4 +88,14 @@ test.describe("visual Tag", () => { await expect(component).toHaveScreenshot(); }); }); + + test("screenshot rtl general", async ({ mount }) => { + const component = await mount( + + + , + ); + + await expect(component).toHaveScreenshot(); + }); }); diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-darwin.png index 2ef65a3a67..b55ec2e25f 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-linux.png index 38cc6cce6b..6364ba3ca3 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Desktop-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-darwin.png index 588a55d8d3..997ec4f1ca 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-linux.png index 8d41554d5f..ebaa621a60 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Desktop-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-darwin.png index 817d6d30e7..369b061265 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-linux.png index 9704d05fdd..8a0184b731 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Large-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-darwin.png index 6c23b60b99..81f68cf46d 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-linux.png index 4d204b5a7d..064923382a 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Medium-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-darwin.png index 0979a79a54..aab65c1079 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-linux.png index 77170e7098..a57e5f1135 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Small-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-darwin.png index 830562a26a..e1d416d66e 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-darwin.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-linux.png index 4fe93dfe00..ceb2ff08eb 100644 Binary files a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-linux.png and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-general-1-Tablet-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-darwin.png new file mode 100644 index 0000000000..e54dea5777 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-linux.png new file mode 100644 index 0000000000..adfb657d98 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Desktop-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-darwin.png new file mode 100644 index 0000000000..f749d589f2 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-linux.png new file mode 100644 index 0000000000..5381830370 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Desktop-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-darwin.png new file mode 100644 index 0000000000..bc407fb454 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-linux.png new file mode 100644 index 0000000000..7b9beb4cf1 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Large-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-darwin.png new file mode 100644 index 0000000000..444bd6dcef Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-linux.png new file mode 100644 index 0000000000..2b316420cb Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Medium-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-darwin.png new file mode 100644 index 0000000000..95b0c1bcd8 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-linux.png new file mode 100644 index 0000000000..0b58b039ba Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Small-Mobile-linux.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-darwin.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-darwin.png new file mode 100644 index 0000000000..b5143be521 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-darwin.png differ diff --git a/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-linux.png b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-linux.png new file mode 100644 index 0000000000..93fe7d58a5 Binary files /dev/null and b/packages/orbit-components/src/Tag/Tag.ct.tsx-snapshots/visual-Tag-screenshot-rtl-general-1-Tablet-linux.png differ diff --git a/packages/orbit-components/src/Tag/index.tsx b/packages/orbit-components/src/Tag/index.tsx index 6f38322306..387243528e 100644 --- a/packages/orbit-components/src/Tag/index.tsx +++ b/packages/orbit-components/src/Tag/index.tsx @@ -89,7 +89,7 @@ const Tag = React.forwardRef( onKeyDown={ev => buttonClickEmulation(ev, onClick)} > {iconLeft && ( -
+
{iconLeft}
)}