We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 195b7c6 commit ed720b1Copy full SHA for ed720b1
src/utils.ts
@@ -0,0 +1,8 @@
1
+import { DecorationType } from "./types";
2
+
3
+export const classNames = (...classes: Array<string | undefined | false>) =>
4
+ classes.filter(a => !!a).join(" ");
5
6
+export const getTextContent = (text: DecorationType[]) => {
7
+ return text.reduce((prev, current) => prev + current[0], "");
8
+};
0 commit comments