Skip to content

Commit

Permalink
Add note about the inert attribute in the Disabled storybook example
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo committed Oct 25, 2022
1 parent 0cfb567 commit 0319599
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions packages/components/src/disabled/stories/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,41 @@ const Form = () => {
{ value: 'c', label: 'Option C' },
] }
/>

<hr
style={ {
marginTop: '100px',
borderColor: '#ddd',
borderStyle: 'solid',
borderBottom: 'none',
} }
/>

<p
style={ {
color: '#aaa',
fontSize: '0.9em',
} }
>
Note: this component may not behave as expected in browsers that
don&apos;t support the{ ' ' }
<a
href="https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/inert"
target="_blank"
rel="noreferrer"
>
inert HTML attribute
</a>
. We recommend adding{ ' ' }
<a
href="https://github.com/WICG/inert"
target="_blank"
rel="noreferrer"
>
the polyfill
</a>{ ' ' }
when using this component in your project.
</p>
</div>
);
};
Expand Down

0 comments on commit 0319599

Please sign in to comment.