Merge branch 'main' of github.com:AmruthPillai/Reactive-Resume

This commit is contained in:
Amruth Pillai
2025-11-03 23:21:53 +01:00
3 changed files with 35 additions and 11 deletions

View File

@ -151,6 +151,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("bold")}
disabled={!editor.can().chain().toggleBold().run()}
data-state={editor.isActive("bold") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleBold().run()}
>
<TextBIcon />
@ -163,6 +164,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("italic")}
disabled={!editor.can().chain().focus().toggleItalic().run()}
data-state={editor.isActive("italic") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleItalic().run()}
>
<TextItalicIcon />
@ -175,6 +177,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("strike")}
disabled={!editor.can().chain().focus().toggleStrike().run()}
data-state={editor.isActive("strike") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleStrike().run()}
>
<TextStrikethroughIcon />
@ -187,6 +190,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("underline")}
disabled={!editor.can().chain().focus().toggleUnderline().run()}
data-state={editor.isActive("underline") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleUnderline().run()}
>
<TextAUnderlineIcon />
@ -199,6 +203,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("highlight")}
disabled={!editor.can().chain().focus().toggleHighlight().run()}
data-state={editor.isActive("highlight") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleHighlight().run()}
>
<HighlighterCircleIcon />
@ -219,6 +224,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("code")}
disabled={!editor.can().chain().focus().toggleCode().run()}
data-state={editor.isActive("code") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleCode().run()}
>
<CodeIconImport />
@ -231,6 +237,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("codeBlock")}
disabled={!editor.can().chain().focus().toggleCodeBlock().run()}
data-state={editor.isActive("codeBlock") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleCodeBlock().run()}
>
<CodeBlockIconImport />
@ -245,6 +252,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("heading", { level: 1 })}
disabled={!editor.can().chain().focus().toggleHeading({ level: 1 }).run()}
data-state={editor.isActive("heading", { level: 1 }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleHeading({ level: 1 }).run()}
>
<TextHOneIcon />
@ -257,6 +265,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("heading", { level: 2 })}
disabled={!editor.can().chain().focus().toggleHeading({ level: 2 }).run()}
data-state={editor.isActive("heading", { level: 2 }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleHeading({ level: 2 }).run()}
>
<TextHTwoIcon />
@ -269,6 +278,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("heading", { level: 3 })}
disabled={!editor.can().chain().focus().toggleHeading({ level: 3 }).run()}
data-state={editor.isActive("heading", { level: 3 }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleHeading({ level: 3 }).run()}
>
<TextHThreeIcon />
@ -280,6 +290,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
size="sm"
type="button"
pressed={editor.isActive("paragraph")}
data-state={editor.isActive("paragraph") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().setParagraph().run()}
>
<ParagraphIconImport />
@ -294,6 +305,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive({ textAlign: "left" })}
disabled={!editor.can().chain().focus().setTextAlign("left").run()}
data-state={editor.isActive({ textAlign: "left" }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().setTextAlign("left").run()}
>
<TextAlignLeftIcon />
@ -306,6 +318,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive({ textAlign: "center" })}
disabled={!editor.can().chain().focus().setTextAlign("center").run()}
data-state={editor.isActive({ textAlign: "center" }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().setTextAlign("center").run()}
>
<TextAlignCenterIcon />
@ -318,6 +331,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive({ textAlign: "right" })}
disabled={!editor.can().chain().focus().setTextAlign("right").run()}
data-state={editor.isActive({ textAlign: "right" }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().setTextAlign("right").run()}
>
<TextAlignRightIcon />
@ -330,6 +344,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive({ textAlign: "justify" })}
disabled={!editor.can().chain().focus().setTextAlign("justify").run()}
data-state={editor.isActive({ textAlign: "justify" }) ? "on" : "off"}
onPressedChange={() => editor.chain().focus().setTextAlign("justify").run()}
>
<TextAlignJustifyIcon />
@ -344,6 +359,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("bulletList")}
disabled={!editor.can().chain().focus().toggleBulletList().run()}
data-state={editor.isActive("bulletList") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleBulletList().run()}
>
<ListBulletsIcon />
@ -356,6 +372,7 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
type="button"
pressed={editor.isActive("orderedList")}
disabled={!editor.can().chain().focus().toggleOrderedList().run()}
data-state={editor.isActive("orderedList") ? "on" : "off"}
onPressedChange={() => editor.chain().focus().toggleOrderedList().run()}
>
<ListNumbersIcon />