Sha256: f3d7fbba2358169ebc6a812a6a09a0d94c784b9ff0a8cd0b064a19c502abbf2b

Contents?: true

Size: 1.16 KB

Versions: 258

Compression:

Stored size: 1.16 KB

Contents

import React from "react";
import FlexItem from "../../pb_flex/_flex_item";
import EditorButton from "./EditorButton";
import { ToolbarTypes } from "./EditorTypes";

const ToolbarHistoryItems = ({editor}:any) => {

const toolbarHistoryItems = [
    {
        classname: `toolbar_button`,
        icon: "undo",
        text: "Undo",
        onclick: () => editor.chain().focus().undo().run(),
        disable: !editor.can().chain().focus().undo().run()
    },
    {
        classname: `toolbar_button`,
        icon: "redo",
        text: "Redo",
        onclick: () => editor.chain().focus().redo().run(),
        disable: !editor.can().chain().focus().redo().run()
    },
];

    return (
    <>
    <FlexItem displayFlex>
          {toolbarHistoryItems.map(
            ({ onclick, classname, disable, icon, text }:ToolbarTypes, index:number) => (
              <EditorButton
                classname={classname}
                onclick={onclick}
                disable={disable}
                icon={icon}
                key={index}
                text={text}
              />
            )
          )}
        </FlexItem>
    </>
    )
}

export default ToolbarHistoryItems

Version data entries

258 entries across 258 versions & 1 rubygems

Version Path
playbook_ui-13.15.0.pre.alpha.play10841940 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.15.0.pre.alpha.1132globalpropdatepickerspacing1929 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.15.0.pre.alpha.PLAY11311893 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.15.0.pre.alpha.reactselectbump581876 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.15.0.pre.alpha.PLAY10831873 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.play1101betaicons1825 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.play1101betaicons1798 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.play1120lintdatepicker1797 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.15.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.PLAY1109bugdisplaypropblocksfontcolor1784 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.play1106filter1751 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0.pre.alpha.play1106filter1748 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.14.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1097linterenhancedelement1728 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.play10821727 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.play10821726 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.play10221678 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.PLAY1090csstokens1675 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0.pre.alpha.play900startratingasinput1657 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.13.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx