UNPKG

879 BJavaScriptView Raw
1"use strict";
2/**
3 * @reach/visually-hidden v0.18.0
4 *
5 * Copyright (c) 2018-2022, React Training LLC
6 *
7 * This source code is licensed under the MIT license found in the
8 * LICENSE.md file in the root directory of this source tree.
9 *
10 * @license MIT
11 */
12
13
14// src/reach-visually-hidden.tsx
15import * as React from "react";
16var VisuallyHidden = React.forwardRef(function VisuallyHidden2({ as: Comp = "span", style = {}, ...props }, ref) {
17 return /* @__PURE__ */ React.createElement(Comp, {
18 ref,
19 style: {
20 border: 0,
21 clip: "rect(0 0 0 0)",
22 height: "1px",
23 margin: "-1px",
24 overflow: "hidden",
25 padding: 0,
26 position: "absolute",
27 width: "1px",
28 whiteSpace: "nowrap",
29 wordWrap: "normal",
30 ...style
31 },
32 ...props
33 });
34});
35VisuallyHidden.displayName = "VisuallyHidden";
36export {
37 VisuallyHidden
38};