@codeworker.br/govbr-tw-react
Version:
Biblioteca de componentes React usando Tailwind CSS que implementa o Padrão Digital de Governo.
46 lines (45 loc) • 1.58 kB
TypeScript
import { type VariantProps } from "class-variance-authority";
/**
* TextEditor – Markdown textarea com toolbar e preview
* Agora com i18n: labels configuráveis via prop `labels`.
*/
declare const editorVariants: (props?: ({
variant?: "default" | "danger" | "success" | "warning" | "dark" | "featured" | null | undefined;
density?: "default" | "lowest" | "low" | "high" | null | undefined;
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
export type TextEditorLabels = {
bold: string;
italic: string;
headings: string;
headingsMenuTitle: string;
link: string;
unorderedList: string;
orderedList: string;
code: string;
quote: string;
table: string;
preview: string;
edit: string;
columns: string;
rows: string;
insert: string;
cancel: string;
selectedPlaceholder: string;
tableHeaderBase: string;
nothingToPreview: string;
};
export declare const DEFAULT_LABELS_PT_BR: TextEditorLabels;
export type TextEditorProps = {
value: string;
onChange: (nextValue: string) => void;
placeholder?: string;
label?: string;
hint?: string;
previewInitially?: boolean;
className?: string;
disabled?: boolean;
readOnly?: boolean;
labels?: Partial<TextEditorLabels>;
} & VariantProps<typeof editorVariants>;
export default function TextEditor({ value, onChange, placeholder, label, hint, previewInitially, className, disabled, readOnly, variant, density, labels, }: TextEditorProps): import("react/jsx-runtime").JSX.Element;
export {};