UNPKG

brandeur-primitives

Version:

Primitive components for brandeur

24 lines 562 B
import React from 'react'; var style = { clip: 'rect(1px, 1px, 1px, 1px)', clipPath: 'inset(50%)', position: 'absolute', overflow: 'hidden', whiteSpace: 'nowrap', border: 0, padding: 0, height: 1, width: 1 }; export default function createVisuallyHidden(_ref) { var El = _ref.El; return function VisuallyHidden(_ref2) { var _ref2$as = _ref2.as, as = _ref2$as === void 0 ? 'div' : _ref2$as, children = _ref2.children; return /*#__PURE__*/React.createElement(El, { as: as, style: style }, children); }; }