franken-ui
Version:
Franken UI is an HTML-first, open-source library of UI components based on the utility-first Tailwind CSS with UIkit 3 compatibility. The design is based on shadcn/ui ported to be framework-agnostic.
38 lines (37 loc) • 1.06 kB
JavaScript
import merge from 'lodash/merge.js';
export const rules = {
'.uk-description-list > dt': {
color: '#333',
fontSize: '0.875rem',
fontWeight: 'normal',
textTransform: 'uppercase'
},
'.uk-description-list > dt:nth-child(n + 2)': { marginTop: '20px' },
'.uk-description-list-divider > dt:nth-child(n + 2)': {
marginTop: '20px',
paddingTop: '20px',
borderTop: '1px solid #e5e5e5'
}
};
export const addHooks = (args) => {
const { hooks } = args;
const defaultHooks = {
'hook-term': {},
'hook-description': {},
'hook-divider-term': {},
'hook-misc': {}
};
const _hooks = merge(defaultHooks, hooks);
return {
'.uk-description-list > dt': {
..._hooks['hook-term']
},
'.uk-description-list > dd': {
..._hooks['hook-description']
},
'.uk-description-list-divider > dt:nth-child(n + 2)': {
..._hooks['hook-divider-term']
},
..._hooks['hook-misc']
};
};