Skip to content

Commit

Permalink
chore: add a11y rules to Storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
sarkaaa committed Oct 31, 2024
1 parent a10bda1 commit a8a7fac
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/orbit-components/.storybook/orbitDecorator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ const OrbitDecorator: Decorator = (storyFn, context) => {
<Text spaceAfter="largest" type={inverted ? "white" : "primary"}>
{context.parameters?.info}
</Text>
{children}
{/* eslint-disable-next-line tailwindcss/no-custom-classname */}
<div className="story-content">{children}</div>
<div dir="ltr" className="mt-600 relative">
<Tile>
<Highlight theme={themes.vsLight} code={code} language="tsx">
Expand Down
3 changes: 3 additions & 0 deletions packages/orbit-components/.storybook/preview.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const preview: Preview = {
decorators: [orbitDecorator],
parameters: {
viewport: { viewports },
a11y: {
element: ".story-content",
},
},
};

Expand Down

0 comments on commit a8a7fac

Please sign in to comment.