feat(markdown): add markdown
This commit is contained in:
parent
6117b9e887
commit
0193880cb0
4036 changed files with 25057 additions and 1990 deletions
21
src/markdown/text.tsx
Normal file
21
src/markdown/text.tsx
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
import type { CSSProperties } from "react";
|
||||
|
||||
import type { EmojiRegistry } from "./emoji-data";
|
||||
import { Markdown } from "./markdown";
|
||||
|
||||
export type TextProps = {
|
||||
fontSize?: CSSProperties["fontSize"];
|
||||
registry?: EmojiRegistry;
|
||||
value: string;
|
||||
};
|
||||
|
||||
export default function Text({ fontSize, registry, value }: TextProps) {
|
||||
return (
|
||||
<Markdown
|
||||
content={value}
|
||||
registry={registry}
|
||||
variant="compact"
|
||||
style={{ fontSize: fontSize ?? "1rem" }}
|
||||
/>
|
||||
);
|
||||
}
|
||||
Loading…
Reference in a new issue