Skip to content

Commit 5b0fdc5

Browse files
committed
refactor: small refactors and fixes in components
1 parent 8140409 commit 5b0fdc5

File tree

6 files changed

+18
-12
lines changed

6 files changed

+18
-12
lines changed

src/components/Button/CButton.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,11 @@ export default {
9090
domProps,
9191
on
9292
}
93-
return h(isButton ? 'button' : CLink , mergeData(data, componentData), children)
93+
return h(
94+
isButton ? 'button' : CLink,
95+
mergeData(data, componentData),
96+
children
97+
)
9498
}
9599
}
96100
</script>

src/components/Form/formProps.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const props = Object.assign({}, universalProps, {
3535
const textInputsProps = {
3636
readonly: Boolean,
3737
plaintext: Boolean,
38-
value: String,
38+
value: [String, Number],
3939
lazy: {
4040
type: [Boolean, Number],
4141
default: 400

src/components/Form/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import CFormFile from './CFormFile'
55
import CFormTextarea from './CFormTextarea'
66
import CFormSelect from './CFormSelect'
77
import CFormRadio from './CFormRadio'
8+
import CFormGroup from './CFormGroup'
89

910
export {
1011
CForm,
@@ -13,5 +14,6 @@ export {
1314
CFormFile,
1415
CFormTextarea,
1516
CFormSelect,
16-
CFormRadio
17+
CFormRadio,
18+
CFormGroup
1719
}

src/components/Switch/CSwitch.vue

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
:type="type"
66
:checked="isChecked"
77
:value="value"
8-
class="switch-input form-check-input"
8+
class="c-switch-input form-check-input"
99
@change="toggle"
1010
>
1111
<span
1212
:data-checked="labelOn"
1313
:data-unchecked="labelOff"
14-
class="switch-slider"
14+
class="c-switch-slider"
1515
>
1616
</span>
1717
</label>
@@ -72,12 +72,12 @@ export default {
7272
const outlineString = this.outline ? '-outline' : ''
7373
const outlinedAltString = this.outline === 'alt' ? '-alt' : ''
7474
return [
75-
'switch form-check-label',
76-
`switch${outlineString}-${this.variant}${outlinedAltString}`,
75+
'c-switch form-check-label',
76+
`c-switch${outlineString}-${this.variant}${outlinedAltString}`,
7777
{
78-
[`switch-${this.size}`]: this.size,
79-
[`switch-${this.shape}`]: this.shape,
80-
'switch-label': this.labelOn || this.labelOff
78+
[`c-switch-${this.size}`]: this.size,
79+
[`c-switch-${this.shape}`]: this.shape,
80+
'c-switch-label': this.labelOn || this.labelOff
8181
}
8282
]
8383
}

src/components/Widgets/CWidgetDropdown.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="card" :class="`bg-${variant}`">
2+
<div class="card" :class="`bg-${variant} text-white`">
33
<slot name="header"></slot>
44
<div class="card-body pb-0">
55
<slot></slot>

src/components/Widgets/CWidgetHeaderDetails.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<div class="card" :class="`bg-${variant}`">
2+
<div class="card" :class="`bg-${variant} text-white`">
33
<div class="card-header">
44
<div class="font-weight-bold">
55
<span v-if="rightHeader">{{rightHeader}}</span>

0 commit comments

Comments
 (0)