Skip to content

Commit

Permalink
fix: fix Html casing for props (#2594)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored and tmorehouse committed Feb 15, 2019
1 parent 9883f8f commit 3772bf5
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/components/card/card-footer.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const props = assign({}, copyProps(cardMixin.props, prefixPropName.bind(n
type: String,
default: null
},
footerHTML: {
footerHtml: {
type: String,
default: null
},
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
}
]
}),
children || [h('div', { domProps: htmlOrText(props.footerHTML, props.footer) })]
children || [h('div', { domProps: htmlOrText(props.footerHtml, props.footer) })]
)
}
}
4 changes: 2 additions & 2 deletions src/components/card/card-header.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export const props = assign({}, copyProps(cardMixin.props, prefixPropName.bind(n
type: String,
default: null
},
headerHTML: {
headerHtml: {
type: String,
default: null
},
Expand Down Expand Up @@ -40,7 +40,7 @@ export default {
}
]
}),
children || [h('div', { domProps: htmlOrText(props.headerHTML, props.header) })]
children || [h('div', { domProps: htmlOrText(props.headerHtml, props.header) })]
)
}
}
12 changes: 6 additions & 6 deletions src/components/carousel/carousel-slide.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export default {
caption: {
type: String
},
captionHTML: {
captionHtml: {
type: String
},
captionTag: {
Expand All @@ -64,7 +64,7 @@ export default {
text: {
type: String
},
textHTML: {
textHtml: {
type: String
},
textTag: {
Expand Down Expand Up @@ -129,13 +129,13 @@ export default {
this.contentTag,
{ staticClass: 'carousel-caption', class: this.contentClasses },
[
this.caption || this.captionHTML
this.caption || this.captionHtml
? h(this.captionTag, {
domProps: htmlOrText(this.captionHTML, this.caption)
domProps: htmlOrText(this.captionHtml, this.caption)
})
: h(false),
this.text || this.textHTML
? h(this.textTag, { domProps: htmlOrText(this.textHTML, this.text) })
this.text || this.textHtml
? h(this.textTag, { domProps: htmlOrText(this.textHtml, this.text) })
: h(false),
$slots.default
]
Expand Down
12 changes: 6 additions & 6 deletions src/components/jumbotron/jumbotron.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const props = {
type: String,
default: null
},
headerHTML: {
headerHtml: {
type: String,
default: null
},
Expand All @@ -31,7 +31,7 @@ export const props = {
type: String,
default: null
},
leadHTML: {
leadHtml: {
type: String,
default: null
},
Expand Down Expand Up @@ -69,7 +69,7 @@ export default {
const $slots = slots()

// Header
if (props.header || $slots.header || props.headerHTML) {
if (props.header || $slots.header || props.headerHtml) {
childNodes.push(
h(
props.headerTag,
Expand All @@ -78,18 +78,18 @@ export default {
[`display-${props.headerLevel}`]: Boolean(props.headerLevel)
}
},
$slots.header || props.headerHTML || stripTags(props.header)
$slots.header || props.headerHtml || stripTags(props.header)
)
)
}

// Lead
if (props.lead || $slots.lead || props.leadHTML) {
if (props.lead || $slots.lead || props.leadHtml) {
childNodes.push(
h(
props.leadTag,
{ staticClass: 'lead' },
$slots.lead || props.leadHTML || stripTags(props.lead)
$slots.lead || props.leadHtml || stripTags(props.lead)
)
)
}
Expand Down
12 changes: 6 additions & 6 deletions src/components/modal/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export default {
type: String,
default: ''
},
titleHTML: {
titleHtml: {
type: String
},
titleTag: {
Expand Down Expand Up @@ -237,14 +237,14 @@ export default {
type: String,
default: 'Cancel'
},
cancelTitleHTML: {
cancelTitleHtml: {
type: String
},
okTitle: {
type: String,
default: 'OK'
},
okTitleHTML: {
okTitleHtml: {
type: String
},
cancelVariant: {
Expand Down Expand Up @@ -816,7 +816,7 @@ export default {
}
modalHeader = [
h(this.titleTag, { class: ['modal-title'] }, [
$slots['modal-title'] || this.titleHTML || stripTags(this.title)
$slots['modal-title'] || this.titleHtml || stripTags(this.title)
]),
closeButton
]
Expand Down Expand Up @@ -864,7 +864,7 @@ export default {
}
}
},
[$slots['modal-cancel'] || this.cancelTitleHTML || stripTags(this.cancelTitle)]
[$slots['modal-cancel'] || this.cancelTitleHtml || stripTags(this.cancelTitle)]
)
}
const okButton = h(
Expand All @@ -881,7 +881,7 @@ export default {
}
}
},
[$slots['modal-ok'] || this.okTitleHTML || stripTags(this.okTitle)]
[$slots['modal-ok'] || this.okTitleHtml || stripTags(this.okTitle)]
)
modalFooter = [cancelButton, okButton]
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/progress/progress-bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
type: String,
default: null
},
labelHTML: {
labelHtml: {
type: String
},
// $parent prop values take precedence over the following props
Expand Down Expand Up @@ -106,8 +106,8 @@ export default {
let childNodes = h(false)
if (this.$slots.default) {
childNodes = this.$slots.default
} else if (this.label || this.labelHTML) {
childNodes = h('span', { domProps: htmlOrText(this.labelHTML, this.label) })
} else if (this.label || this.labelHtml) {
childNodes = h('span', { domProps: htmlOrText(this.labelHtml, this.label) })
} else if (this.computedShowProgress) {
childNodes = this.computedProgress.toFixed(this.computedPrecision)
} else if (this.computedShowValue) {
Expand Down
16 changes: 8 additions & 8 deletions src/components/table/table.js
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export default {
type: String,
default: null
},
captionHTML: {
captionHtml: {
type: String
},
captionTop: {
Expand Down Expand Up @@ -352,14 +352,14 @@ export default {
type: String,
default: 'There are no records to show'
},
emptyHTML: {
emptyHtml: {
type: String
},
emptyFilteredText: {
type: String,
default: 'There are no records matching your request'
},
emptyFilteredHTML: {
emptyFilteredHtml: {
type: String
},
apiUrl: {
Expand Down Expand Up @@ -1136,15 +1136,15 @@ export default {
// Build the caption
let caption = h(false)
let captionId = null
if (this.caption || this.captionHTML || $slots['table-caption']) {
if (this.caption || this.captionHtml || $slots['table-caption']) {
captionId = this.isStacked ? this.safeId('_caption_') : null
const data = {
key: 'caption',
id: captionId,
class: this.captionClasses
}
if (!$slots['table-caption']) {
data.domProps = htmlOrText(this.captionHTML, this.caption)
data.domProps = htmlOrText(this.captionHtml, this.caption)
}
caption = h('caption', data, $slots['table-caption'])
}
Expand Down Expand Up @@ -1210,7 +1210,7 @@ export default {
if (slot) {
slot = [slot({ label: field.label, column: field.key, field: field })]
} else {
data.domProps = htmlOrText(field.labelHTML, field.label)
data.domProps = htmlOrText(field.labelHtml, field.label)
}
return h('th', data, slot)
})
Expand Down Expand Up @@ -1478,8 +1478,8 @@ export default {
empty = h('div', {
class: ['text-center', 'my-2'],
domProps: this.isFiltered
? htmlOrText(this.emptyFilteredHTML, this.emptyFilteredText)
: htmlOrText(this.emptyHTML, this.emptyText)
? htmlOrText(this.emptyFilteredHtml, this.emptyFilteredText)
: htmlOrText(this.emptyHtml, this.emptyText)
})
}
empty = h(
Expand Down

0 comments on commit 3772bf5

Please sign in to comment.