reablocks
Version:
Component library for React
40 lines (39 loc) • 988 B
TypeScript
import { FC } from 'react';
import { RedactTheme } from './RedactTheme';
export interface RedactProps {
/**
* Classname of the element.
*/
className?: string;
/**
* Whether you can toggle the text or not.
* @default true
*/
allowToggle?: boolean;
/**
* Number of mask characters shown between the first and last characters,
* regardless of the value's length (e.g. `compactLength: 8` renders
* `m********d`). When 0, the middle is masked at its true length.
* @default 8
*/
compactLength?: number;
/**
* The character to replace the text with.
* @default '*'
*/
character?: string;
/**
* Text to show upon hover.
* @default 'Click to toggle sensitive content'
*/
tooltipText?: string;
/**
* Value to conceal.
*/
value?: string;
/**
* The theme for the Redact.
*/
theme?: RedactTheme;
}
export declare const Redact: FC<RedactProps>;