@greensight/gds
Version:
Greensight Design System
27 lines (23 loc) • 642 B
JavaScript
import 'react';
import { j as jsx } from './emotion-react.esm-CuKt2qQ4.js';
import './emotion-element-c16c303e.esm-CnTrGsmj.js';
var visuallyHiddenCSS = {
position: 'absolute',
width: 1,
height: 1,
padding: 0,
border: 'none',
overflow: 'hidden',
clip: 'rect(1px, 1px, 1px, 1px)',
whiteSpace: 'nowrap'
};
/**
* Component to wrap components to make them visually hidden. These components still will be available for assistive technologies.
*/
var VisuallyHidden = function VisuallyHidden(_ref) {
var children = _ref.children;
return jsx("div", {
css: visuallyHiddenCSS
}, children);
};
export { VisuallyHidden };