bootstrap-vue
Version:
With more than 85 components, over 45 available plugins, several directives, and 1000+ icons, BootstrapVue provides one of the most comprehensive implementations of the Bootstrap v4 component and grid system available for Vue.js v2.6, complete with extens
32 lines (27 loc) • 850 B
JavaScript
import { extend, mergeData } from '../../vue'
import { NAME_INPUT_GROUP_APPEND } from '../../constants/components'
import { omit } from '../../utils/object'
import { makePropsConfigurable } from '../../utils/props'
import { BInputGroupAddon, props as BInputGroupAddonProps } from './input-group-addon'
// --- Props ---
export const props = makePropsConfigurable(
omit(BInputGroupAddonProps, ['append']),
NAME_INPUT_GROUP_APPEND
)
// --- Main component ---
// @vue/component
export const BInputGroupAppend = /*#__PURE__*/ extend({
name: NAME_INPUT_GROUP_APPEND,
functional: true,
props,
render(h, { props, data, children }) {
// Pass all our data down to child, and set `append` to `true`
return h(
BInputGroupAddon,
mergeData(data, {
props: { ...props, append: true }
}),
children
)
}
})