mirror of
https://github.com/hanzoai/sentinel.git
synced 2026-09-29 22:34:33 +00:00
18 lines
464 B
TypeScript
18 lines
464 B
TypeScript
import {AnnotatedTextErrors} from './annotatedTextErrors';
|
|
import {AnnotatedTextValue} from './annotatedTextValue';
|
|
|
|
type Props = {
|
|
value: React.ReactNode;
|
|
className?: string;
|
|
meta?: Record<any, any>;
|
|
};
|
|
|
|
export function AnnotatedText({value, meta, className, ...props}: Props) {
|
|
return (
|
|
<span className={className} {...props}>
|
|
<AnnotatedTextValue value={value} meta={meta} />
|
|
<AnnotatedTextErrors errors={meta?.err} />
|
|
</span>
|
|
);
|
|
}
|