File size: 654 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
import { VisuallyHidden } from '@wordpress/components';

const VisuallyHiddenExample = () => (
	<>
		<div>
			<VisuallyHidden>This should not show.</VisuallyHidden>
			<div>
				This text will <VisuallyHidden as="span">but not inline </VisuallyHidden> always show.
			</div>
		</div>
		<hr />
		<div>
			Additional class names passed to VisuallyHidden extend the component class name.{ ' ' }
			{ /* eslint-disable-next-line wpcalypso/jsx-classname-namespace */ }
			<VisuallyHidden as="label" className="test-input">
				Check out my class!{ ' ' }
			</VisuallyHidden>
			Inspect the HTML to see!
		</div>
	</>
);

export default VisuallyHiddenExample;