A UI Toolkit built on Vue.js 3.0 with @primer/css and Github Docs.
The size of form components like button input date-range and so on have size classes, should add a PrComponentSize
type set it.
for example: btn btn-sm
, btn btn-large
type PrComponentSize = 'small' | 'default' | 'large'
then the size should be transformed to actual class.
const getSizeSuffix = (componentSize: PrComponentSize): string => {
const sizeSuffix = {
small: 'sm',
default: '',
large: 'large'
}
return sizeSuffix[componentSize]
}
Author: angela-1
Source Code: https://github.com/angela-1/primer-vue
#vue #vuejs #javascript