Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions lib/components/ToolbarDefaults.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ class ToolbarDefaults extends PureComponent<ToolbarDefaultProps> {
onClick={onUndoRedo}
label={getButtonLabel(UNDO_TYPE, showUndoControl)}
title={getButtonTitle(UNDO_TYPE, showUndoControl)}
icon={
typeof showUndoControl !== "boolean" ? showUndoControl.icon : null
}
/>
) : null}

Expand All @@ -194,6 +197,9 @@ class ToolbarDefaults extends PureComponent<ToolbarDefaultProps> {
onClick={onUndoRedo}
label={getButtonLabel(REDO_TYPE, showRedoControl)}
title={getButtonTitle(REDO_TYPE, showRedoControl)}
icon={
typeof showRedoControl !== "boolean" ? showRedoControl.icon : null
}
/>
) : null}
</ToolbarGroup>,
Expand Down
42 changes: 40 additions & 2 deletions lib/components/__snapshots__/ToolbarDefaults.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ exports[`ToolbarDefaults #showRedoControl control overrides 1`] = `
>
<ToolbarButton
active={false}
icon={null}
icon="#icon-redo"
label="Redo"
name="redo"
onClick={[Function]}
Expand All @@ -786,6 +786,25 @@ Ctrl + ⇧ + Z"
tabIndex={-1}
type="button"
>
<Icon
className={null}
icon="#icon-redo"
title={null}
>
<svg
aria-hidden={true}
aria-label={null}
className="Draftail-Icon "
height="16"
role={null}
viewBox="0 0 1024 1024"
width="16"
>
<use
xlinkHref="#icon-redo"
/>
</svg>
</Icon>
<span
className="Draftail-ToolbarButton__label"
>
Expand Down Expand Up @@ -910,7 +929,7 @@ exports[`ToolbarDefaults #showUndoControl control overrides 1`] = `
>
<ToolbarButton
active={false}
icon={null}
icon="#icon-undo"
label="Undo"
name="undo"
onClick={[Function]}
Expand All @@ -928,6 +947,25 @@ Ctrl + Z"
tabIndex={-1}
type="button"
>
<Icon
className={null}
icon="#icon-undo"
title={null}
>
<svg
aria-hidden={true}
aria-label={null}
className="Draftail-Icon "
height="16"
role={null}
viewBox="0 0 1024 1024"
width="16"
>
<use
xlinkHref="#icon-undo"
/>
</svg>
</Icon>
<span
className="Draftail-ToolbarButton__label"
>
Expand Down