Add description to all props from components
This commit is contained in:
parent
318833d9cf
commit
3c6c28c472
@ -31,11 +31,13 @@
|
|||||||
},
|
},
|
||||||
dismissible: {
|
dismissible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
|
description: 'Whether alert is dismissible (closeable)'
|
||||||
},
|
},
|
||||||
withIcon: {
|
withIcon: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false,
|
||||||
|
description: 'Whether alert contains icon'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
|
|||||||
@ -9,51 +9,59 @@
|
|||||||
{'btn-round': round},
|
{'btn-round': round},
|
||||||
{'btn-block': block},
|
{'btn-block': block},
|
||||||
{'btn-icon btn-fab': icon},
|
{'btn-icon btn-fab': icon},
|
||||||
{[`btn-${type}`]: type && !outline},
|
{[`btn-${type}`]: type},
|
||||||
{[`btn-outline-${type}`]: type && outline},
|
|
||||||
{[`btn-${size}`]: size},
|
{[`btn-${size}`]: size},
|
||||||
{'btn-simple': simple},
|
{'btn-simple': simple},
|
||||||
{'btn-link': link},
|
{'btn-link': link},
|
||||||
{'disabled': disabled && tag !== 'button'}
|
{'disabled': disabled && tag !== 'button'}
|
||||||
]">
|
]">
|
||||||
<slot name="loading">
|
<slot name="loading">
|
||||||
<i v-if="loading" class="fa fa-spinner fa-spin"></i>
|
<i v-if="loading" class="fas fa-spinner fa-spin"></i>
|
||||||
</slot>
|
</slot>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'base-button',
|
name: "base-button",
|
||||||
props: {
|
props: {
|
||||||
tag: {
|
tag: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "button"
|
default: "button",
|
||||||
|
description: "Button html tag"
|
||||||
},
|
},
|
||||||
round: Boolean,
|
round: Boolean,
|
||||||
icon: Boolean,
|
icon: Boolean,
|
||||||
outline: Boolean,
|
|
||||||
block: Boolean,
|
block: Boolean,
|
||||||
loading: Boolean,
|
loading: Boolean,
|
||||||
disabled: Boolean,
|
disabled: Boolean,
|
||||||
type: {
|
type: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "default"
|
default: "default",
|
||||||
|
description: "Button type (primary|secondary|danger etc)"
|
||||||
},
|
},
|
||||||
nativeType: {
|
nativeType: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "button"
|
default: "button",
|
||||||
|
description: "Button native type (e.g button, input etc)"
|
||||||
},
|
},
|
||||||
size: {
|
size: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ""
|
default: "",
|
||||||
|
description: "Button size (sm|lg)"
|
||||||
|
},
|
||||||
|
simple: {
|
||||||
|
type: Boolean,
|
||||||
|
description: "Whether button is simple (outlined)"
|
||||||
|
},
|
||||||
|
link: {
|
||||||
|
type: Boolean,
|
||||||
|
description: "Whether button is a link (no borders or background)"
|
||||||
},
|
},
|
||||||
simple: Boolean,
|
|
||||||
link: Boolean,
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleClick(evt) {
|
handleClick(evt) {
|
||||||
this.$emit('click', evt);
|
this.$emit("click", evt);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -21,10 +21,18 @@
|
|||||||
prop: "checked"
|
prop: "checked"
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
checked: [Array, Boolean],
|
checked: {
|
||||||
disabled: Boolean,
|
type: [Array, Boolean],
|
||||||
inline: Boolean,
|
description: "Whether checkbox is checked"
|
||||||
hasError: Boolean
|
},
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
description: "Whether checkbox is disabled"
|
||||||
|
},
|
||||||
|
inline: {
|
||||||
|
type: Boolean,
|
||||||
|
description: "Whether checkbox should be inline with other checkboxes"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -28,17 +28,35 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
tag: {
|
tag: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "div"
|
default: "div",
|
||||||
|
description: "Dropdown html tag (e.g div, ul etc)"
|
||||||
},
|
},
|
||||||
titleTag: {
|
titleTag: {
|
||||||
type: String,
|
type: String,
|
||||||
default: "button"
|
default: "button",
|
||||||
|
description: "Dropdown title (toggle) html tag"
|
||||||
|
},
|
||||||
|
title: {
|
||||||
|
type: String,
|
||||||
|
description: "Dropdown title",
|
||||||
|
|
||||||
|
},
|
||||||
|
icon: {
|
||||||
|
type: String,
|
||||||
|
description: "Dropdown icon"
|
||||||
|
},
|
||||||
|
titleClasses: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
description: "Title css classes"
|
||||||
|
},
|
||||||
|
menuClasses: {
|
||||||
|
type: [String, Object],
|
||||||
|
description: "Menu css classes"
|
||||||
|
},
|
||||||
|
menuOnRight: {
|
||||||
|
type: Boolean,
|
||||||
|
description: "Whether menu should appear on the right"
|
||||||
},
|
},
|
||||||
title: String,
|
|
||||||
icon: String,
|
|
||||||
titleClasses: [String, Object, Array],
|
|
||||||
menuClasses: [String, Object],
|
|
||||||
menuOnRight: Boolean
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|||||||
@ -24,27 +24,30 @@
|
|||||||
export default {
|
export default {
|
||||||
name: 'base-table',
|
name: 'base-table',
|
||||||
props: {
|
props: {
|
||||||
columns: Array,
|
columns: {
|
||||||
data: Array,
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
description: "Table columns"
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
description: "Table data"
|
||||||
|
},
|
||||||
type: {
|
type: {
|
||||||
type: String, // striped | hover
|
type: String, // striped | hover
|
||||||
default: ""
|
default: "",
|
||||||
},
|
description: "Whether table is striped or hover type"
|
||||||
title: {
|
|
||||||
type: String,
|
|
||||||
default: ""
|
|
||||||
},
|
},
|
||||||
theadClasses: {
|
theadClasses: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
|
description: "<thead> css classes"
|
||||||
},
|
},
|
||||||
tbodyClasses: {
|
tbodyClasses: {
|
||||||
type: String,
|
type: String,
|
||||||
default: ''
|
default: '',
|
||||||
},
|
description: "<tbody> css classes"
|
||||||
subTitle: {
|
|
||||||
type: String,
|
|
||||||
default: ""
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|||||||
@ -16,7 +16,7 @@
|
|||||||
<slot name="image-bottom"></slot>
|
<slot name="image-bottom"></slot>
|
||||||
</div>
|
</div>
|
||||||
<slot name="raw-content"></slot>
|
<slot name="raw-content"></slot>
|
||||||
<div class="card-footer" v-if="$slots.footer">
|
<div class="card-footer" :class="footerClasses" v-if="$slots.footer">
|
||||||
<slot name="footer"></slot>
|
<slot name="footer"></slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -25,10 +25,30 @@
|
|||||||
export default {
|
export default {
|
||||||
name: "card",
|
name: "card",
|
||||||
props: {
|
props: {
|
||||||
title: String,
|
title: {
|
||||||
subTitle: String,
|
|
||||||
type: String,
|
type: String,
|
||||||
headerClasses: [String, Object, Array]
|
description: "Card title"
|
||||||
|
},
|
||||||
|
subTitle: {
|
||||||
|
type: String,
|
||||||
|
description: "Card subtitle"
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: String,
|
||||||
|
description: "Card type (e.g primary/danger etc)"
|
||||||
|
},
|
||||||
|
headerClasses: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
description: "Card header css classes"
|
||||||
|
},
|
||||||
|
bodyClasses: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
description: "Card body css classes"
|
||||||
|
},
|
||||||
|
footerClasses: {
|
||||||
|
type: [String, Object, Array],
|
||||||
|
description: "Card footer css classes"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -39,10 +39,22 @@
|
|||||||
inheritAttrs: false,
|
inheritAttrs: false,
|
||||||
name: "base-input",
|
name: "base-input",
|
||||||
props: {
|
props: {
|
||||||
label: String,
|
label: {
|
||||||
value: [String, Number],
|
type: String,
|
||||||
addonRightIcon: String,
|
description: "Input label"
|
||||||
addonLeftIcon: String
|
},
|
||||||
|
value: {
|
||||||
|
type: [String, Number],
|
||||||
|
description: "Input value"
|
||||||
|
},
|
||||||
|
addonRightIcon: {
|
||||||
|
type: String,
|
||||||
|
description: "Input icon on the right"
|
||||||
|
},
|
||||||
|
addonLeftIcon: {
|
||||||
|
type: String,
|
||||||
|
description: "Input icon on the left"
|
||||||
|
},
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
prop: 'value',
|
prop: 'value',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user