Add option for button type under posts
This commit is contained in:
parent
27b10a709b
commit
b93f491035
|
@ -220,7 +220,8 @@ export default createWidget('post-menu', {
|
||||||
tagName: 'section.post-menu-area.clearfix',
|
tagName: 'section.post-menu-area.clearfix',
|
||||||
|
|
||||||
settings: {
|
settings: {
|
||||||
collapseButtons: true
|
collapseButtons: true,
|
||||||
|
buttonType: 'flat-button'
|
||||||
},
|
},
|
||||||
|
|
||||||
defaultState() {
|
defaultState() {
|
||||||
|
@ -234,7 +235,7 @@ export default createWidget('post-menu', {
|
||||||
if (builder) {
|
if (builder) {
|
||||||
const buttonAtts = builder(attrs, this.state, this.siteSettings);
|
const buttonAtts = builder(attrs, this.state, this.siteSettings);
|
||||||
if (buttonAtts) {
|
if (buttonAtts) {
|
||||||
return this.attach('flat-button', buttonAtts);
|
return this.attach(this.settings.buttonType, buttonAtts);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -295,7 +296,7 @@ export default createWidget('post-menu', {
|
||||||
const { position, beforeButton } = buttonAtts;
|
const { position, beforeButton } = buttonAtts;
|
||||||
delete buttonAtts.position;
|
delete buttonAtts.position;
|
||||||
|
|
||||||
let button = this.attach('button', buttonAtts);
|
let button = this.attach(this.settings.buttonType, buttonAtts);
|
||||||
|
|
||||||
if (beforeButton) {
|
if (beforeButton) {
|
||||||
button = h('span', [beforeButton(h), button]);
|
button = h('span', [beforeButton(h), button]);
|
||||||
|
|
Loading…
Reference in New Issue