@inkline/inkline
Version:
Inkline is the Vue.js UI/UX Library built for creating your next design system
10 lines (8 loc) • 492 B
text/typescript
import { inklineGlobals } from '@inkline/inkline/plugin';
export function defaultPropValue<T> (componentName: string, propertyName: string, propertyValue: T = '' as any) {
return (): T => inklineGlobals.prototype
? (inklineGlobals.prototype.options.componentOptions[componentName]?.[propertyName]
? inklineGlobals.prototype.options.componentOptions[componentName][propertyName]
: inklineGlobals.prototype.options[propertyName])
: propertyValue;
}