Sha256: 488a14cf22ee78c5b6d93a041d39dc514f095fcb2c210f6c30c6e2ce49be180e

Contents?: true

Size: 1.19 KB

Versions: 632

Compression:

Stored size: 1.19 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): React.ReactElement => {

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}
                  disable={disable}
                  icon={icon}
                  key={index}
                  onclick={onclick}
                  text={text}
              />
            )
          )}
        </FlexItem>
    </>
    )
}

export default ToolbarHistoryItems

Version data entries

632 entries across 632 versions & 1 rubygems

Version Path
playbook_ui-13.24.0.pre.alpha.play1305drycontenttag2689 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.24.0.pre.alpha.PBNTR261NewKitDropdown2681 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.24.0.pre.alpha.PLAY1181circleiconkitfixsizingerrorglobalspacingprops2675 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.24.0.pre.alpha.PLAY998backgroundkitremoveemptyinlinline2666 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.23.0.pre.alpha.PLAY1284investigation2657 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.24.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.22.0.pre.alpha.pbntr254barchartnegativenumber2640 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.22.0.pre.alpha.PLAY1297updatetextstyles2636 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.22.0.pre.alpha.playbookgemspecrailsversion2608 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.23.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582531 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582516 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582515 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582514 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.22.0 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR243globalpositioningpropinset2504 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12652489 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY12582474 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PBNTR224letuserresetrowexpansion2466 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx
playbook_ui-13.21.0.pre.alpha.PLAY120322465 app/pb_kits/playbook/pb_rich_text_editor/TipTap/ToolbarHistory.tsx