@datalayer/core
Version:
**Datalayer Core**
25 lines (24 loc) • 558 B
JavaScript
/*
* Copyright (c) 2023-2025 Datalayer, Inc.
* Distributed under the terms of the Modified BSD License.
*/
import { sx } from '@primer/react';
import styled from 'styled-components';
export const VisuallyHidden = styled.span `
${({ isVisible = false }) => {
if (isVisible) {
return sx;
}
return `
position: absolute;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0, 0, 0, 0);
white-space: nowrap;
border-width: 0;
`;
}}
`;