@navinc/base-react-components
Version:
Nav's Pattern Library
32 lines (31 loc) • 1.01 kB
TypeScript
import { DetailedHTMLProps, FC, HTMLAttributes } from 'react';
/**
* DOM attributes required to redact text from systems like FullStory and Heap
*
* @example
* ```tsx
* <div {....redactProps}>Private text will be redacted</div>
* ```
*
* @note `className` is likely to conflict with other props, so it is recommended to use the `<Redact>` component
* instead. If you must use `redactProps`, be sure to spread it after other props.
* ```tsx
* <div className="test" {...redactProps}>Private text will be redacted</div> // className will be overridden here
* ```
*/
export declare const redactProps: {
className: string;
'data-heap-redact-text': string;
};
/**
* Redact children text from systems like FullStory and Heap
*
* @example
* ```tsx
* <Redact>Private text will be redacted</Redact>
* <Redact>
* <Input placeholder="Private text will be redacted" />
* </Redact>
* ```
*/
export declare const Redact: FC<DetailedHTMLProps<HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>>;