redaction.tsx 379 B

123456789101112131415
  1. import styled from '@emotion/styled';
  2. type Props = {
  3. children: React.ReactNode;
  4. className?: string;
  5. withoutBackground?: boolean;
  6. };
  7. export const Redaction = styled(({children, className}: Props) => (
  8. <span className={className}>{children}</span>
  9. ))`
  10. cursor: default;
  11. vertical-align: middle;
  12. ${p => !p.withoutBackground && `background: rgba(255, 0, 0, 0.05);`}
  13. `;