Skip to content

Commit

Permalink
(#0) npm publish (0.0.94)
Browse files Browse the repository at this point in the history
  • Loading branch information
baegofda committed Dec 9, 2023
1 parent 14631d9 commit 25b890e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 17 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bbodek-ui",
"version": "0.0.91",
"version": "0.0.94",
"type": "module",
"author": "Bbodek",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions src/core/components/TextEditor/TextEditor.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const meta = {
},
},
} satisfies Meta<typeof TextEditor>;

export default meta;

export const SmallTextEditor = () => {
Expand Down
34 changes: 18 additions & 16 deletions src/core/components/TextEditor/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from "react";
import ReactQuill from "react-quill";
import React, { Suspense } from "react";
import "react-quill/dist/quill.snow.css";
const ReactQuill = React.lazy(() => import("react-quill"));

interface TextEditorProps {
value: string;
Expand All @@ -12,19 +12,21 @@ export default function TextEditor({
onChange,
}: TextEditorProps) {
return (
<ReactQuill
theme = "snow"
value = {value}
onChange = {onChange}
className = {"w-full h-full"}
modules = {{
toolbar: [
[{ "header": [ 1, 2, false ] }],
[ "bold", "italic", "underline", "strike" ],
[ { "list": "ordered" }, { "list": "bullet" }, { "indent": "-1" }, { "indent": "+1" } ],
["link"],
],
}}
/>
<Suspense fallback = {<></>}>
<ReactQuill
theme = "snow"
value = {value}
onChange = {onChange}
className = {"w-full h-full"}
modules = {{
toolbar: [
[{ "header": [ 1, 2, false ] }],
[ "bold", "italic", "underline", "strike" ],
[ { "list": "ordered" }, { "list": "bullet" }, { "indent": "-1" }, { "indent": "+1" } ],
["link"],
],
}}
/>
</Suspense>
);
}

0 comments on commit 25b890e

Please sign in to comment.