redaction.tsx 430 B

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