mirror of
https://github.com/AmruthPillai/Reactive-Resume.git
synced 2025-11-17 02:01:29 +10:00
Merge branch 'main' into LinuxKunaL/main
This commit is contained in:
@ -152,6 +152,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 />
|
||||
@ -164,6 +165,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 />
|
||||
@ -176,6 +178,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 />
|
||||
@ -188,6 +191,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 />
|
||||
@ -200,12 +204,15 @@ 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 />
|
||||
</Toggle>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Tooltip content="Hyperlink">
|
||||
<Button type="button" size="sm" variant="ghost" className="px-2" onClick={setLink}>
|
||||
<LinkSimpleIcon />
|
||||
@ -218,6 +225,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 />
|
||||
@ -230,18 +238,22 @@ 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 />
|
||||
</Toggle>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Tooltip content="Heading 1">
|
||||
<Toggle
|
||||
size="sm"
|
||||
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 />
|
||||
@ -254,6 +266,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 />
|
||||
@ -266,6 +279,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 />
|
||||
@ -277,18 +291,22 @@ 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 />
|
||||
</Toggle>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Tooltip content="Align Left">
|
||||
<Toggle
|
||||
size="sm"
|
||||
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 />
|
||||
@ -301,6 +319,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 />
|
||||
@ -313,6 +332,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 />
|
||||
@ -325,18 +345,22 @@ 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 />
|
||||
</Toggle>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Tooltip content="Bullet List">
|
||||
<Toggle
|
||||
size="sm"
|
||||
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 />
|
||||
@ -349,6 +373,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 />
|
||||
@ -381,6 +406,8 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Popover>
|
||||
<Tooltip content="Insert Image">
|
||||
<PopoverTrigger asChild>
|
||||
@ -420,6 +447,8 @@ const Toolbar = ({ editor }: { editor: Editor }) => {
|
||||
</Button>
|
||||
</Tooltip>
|
||||
|
||||
<div className="my-auto h-5 w-px bg-border" />
|
||||
|
||||
<Tooltip content="Undo">
|
||||
<Button
|
||||
size="sm"
|
||||
|
||||
Reference in New Issue
Block a user