securityos/components/system/Files/FileManager/Selection/StyledSelection.tsx

24 lines
605 B
TypeScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
import styled, { createGlobalStyle } from "styled-components";
const NoGlobalPointerEvents = createGlobalStyle`
body {
pointer-events: none;
}
`;
const StyledSelectionComponent = styled.span`
background-color: ${({ theme }) => theme.colors.highlightBackground};
border: ${({ theme }) => `1px solid ${theme.colors.highlight}`};
position: absolute;
z-index: 2;
`;
const StyledSelection: FC<React.HTMLAttributes<HTMLSpanElement>> = (props) => (
<>
<NoGlobalPointerEvents />
<StyledSelectionComponent {...props} />
</>
);
export default StyledSelection;