redaction.tsx 398 B

12345678910111213141516
  1. import styled from '@emotion/styled';
  2. type Props = {
  3. children: React.ReactNode;
  4. className?: string;
  5. withoutBackground?: boolean;
  6. };
  7. 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. `;
  14. export default Redaction;