feat: init quizblock

This commit is contained in:
swve 2023-02-28 23:00:38 +01:00
parent eebaef6679
commit 23412ce19a
10 changed files with 263 additions and 6 deletions

View file

@ -1,8 +1,8 @@
import styled from "styled-components";
import { FontBoldIcon, FontItalicIcon, StrikethroughIcon, ArrowLeftIcon, ArrowRightIcon, OpacityIcon } from "@radix-ui/react-icons";
import { AlertCircle, AlertTriangle, FileText, ImagePlus, Info, Sigma, Video, Youtube } from "lucide-react";
import { AlertCircle, AlertTriangle, FileText, GraduationCap, ImagePlus, Info, Sigma, Video, Youtube } from "lucide-react";
export const ToolbarButtons = ({ editor }: any) => {
export const ToolbarButtons = ({ editor, props }: any) => {
if (!editor) {
return null;
}
@ -116,6 +116,19 @@ export const ToolbarButtons = ({ editor }: any) => {
>
<FileText size={15} />
</ToolBtn>
<ToolBtn
onClick={() =>
editor
.chain()
.focus()
.insertContent({
type: "blockQuiz",
})
.run()
}
>
<GraduationCap size={15} />
</ToolBtn>
</ToolButtonsWrapper>
);
};