Skip to content

Commit

Permalink
docs: update visually-hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
cheton committed Nov 19, 2023
1 parent e13b11e commit eb356cf
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
13 changes: 13 additions & 0 deletions packages/react-docs/pages/components/visually-hidden/basic.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { Button, Icon, VisuallyHidden } from '@tonic-ui/react';
import React from 'react';

const App = () => (
<Button variant="secondary">
<VisuallyHidden>
Checkmark
</VisuallyHidden>
<Icon icon="check" />
</Button>
);

export default App;
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@ import { VisuallyHidden } from '@tonic-ui/react';

The text `Checkmark` is visually hidden from the icon button, but it is still readable by screen readers.

```jsx
<Button variant="secondary">
<VisuallyHidden>
Checkmark
</VisuallyHidden>
<Icon icon="check" />
</Button>
```
{render('./basic')}

## Props

Expand Down

0 comments on commit eb356cf

Please sign in to comment.