UNPKG

@inkline/inkline

Version:

Inkline is the Vue.js UI/UX Library built for creating your next design system

61 lines (57 loc) 1.42 kB
import { defineComponent } from 'vue'; import { colorVariantClass, defaultPropValue, sizePropValidator } from '@inkline/inkline/mixins'; import { Classes } from '@inkline/inkline/types'; /** * Slot for default breadcrumb content * @name default * @kind slot */ const componentName = 'IBreadcrumb'; export default defineComponent({ name: componentName, props: { /** * The aria-label of the breadcrumbs * @type String * @default Breadcrumbs * @name ariaLabel */ ariaLabel: { type: String, default: 'Breadcrumbs' }, /** * The color variant of the breadcrumb * @type light | dark * @default light * @name color */ color: { type: String, default: defaultPropValue<string>(componentName, 'color') }, /** * The size variant of the breadcrumb * @type sm | md | lg * @default md * @name size */ size: { type: String, default: defaultPropValue<string>(componentName, 'size'), validator: sizePropValidator } }, computed: { classes (): Classes { return { ...colorVariantClass(this), [`-${this.size}`]: Boolean(this.size) }; } } });