UNPKG

@greensight/gds

Version:
27 lines (23 loc) 684 B
require('react'); var emotionReact_esm = require('./emotion-react.esm-DjRiK_3N.js'); require('./emotion-element-c16c303e.esm-C-l8eTyZ.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 emotionReact_esm.jsx("div", { css: visuallyHiddenCSS }, children); }; exports.VisuallyHidden = VisuallyHidden;