Skip to content

Commit 3475994

Browse files
authored
Merge pull request #492 from xwp/feature/482-remove-link-button
Feature/482 remove link button
2 parents 6857667 + 84eda49 commit 3475994

File tree

2 files changed

+41
-1
lines changed

2 files changed

+41
-1
lines changed

assets/src/block-editor/blocks/card/components/card-action-button.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,17 @@ const CardActionButton = ( {
7070
value={ label }
7171
onChange={ onChangeLabel }
7272
placeholder={ __( 'Button', 'material-design' ) }
73+
allowedFormats={ [
74+
'core/bold',
75+
'core/italic',
76+
'core/code',
77+
'core/image',
78+
'core/strikethrough',
79+
'core/underline',
80+
'core/text-color',
81+
'core/subscript',
82+
'core/superscript',
83+
] }
7384
/>
7485
</button>
7586
) : (
@@ -80,7 +91,10 @@ const CardActionButton = ( {
8091
className="mdc-button mdc-card__action mdc-card__action--button"
8192
>
8293
<div className="mdc-button__ripple"></div>
83-
<span className="mdc-button__label">{ label }</span>
94+
<span
95+
className="mdc-button__label"
96+
dangerouslySetInnerHTML={ { __html: label } }
97+
></span>
8498
</a>
8599
) }
86100
{ isFocused && isEditMode && (

tests/js/block-editor/blocks/cards-collection/__snapshots__/edit.test.js.snap

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11316,6 +11316,19 @@ exports[`blocks: material/cards-collection: Edit removes one card from the ui is
1131611316
className="mdc-button mdc-card__action mdc-card__action--button"
1131711317
>
1131811318
<ForwardRef
11319+
allowedFormats={
11320+
Array [
11321+
"core/bold",
11322+
"core/italic",
11323+
"core/code",
11324+
"core/image",
11325+
"core/strikethrough",
11326+
"core/underline",
11327+
"core/text-color",
11328+
"core/subscript",
11329+
"core/superscript",
11330+
]
11331+
}
1131911332
onChange={[Function]}
1132011333
placeholder="Button"
1132111334
tagName="div"
@@ -11619,6 +11632,19 @@ exports[`blocks: material/cards-collection: Edit removes one card from the ui is
1161911632
className="mdc-button mdc-card__action mdc-card__action--button"
1162011633
>
1162111634
<ForwardRef
11635+
allowedFormats={
11636+
Array [
11637+
"core/bold",
11638+
"core/italic",
11639+
"core/code",
11640+
"core/image",
11641+
"core/strikethrough",
11642+
"core/underline",
11643+
"core/text-color",
11644+
"core/subscript",
11645+
"core/superscript",
11646+
]
11647+
}
1162211648
onChange={[Function]}
1162311649
placeholder="Button"
1162411650
tagName="div"

0 commit comments

Comments
 (0)