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.
33 lines (32 loc) • 791 B
JavaScript
import merge from 'lodash/merge.js';
export const rules = {
'.uk-totop': {
padding: '5px',
color: '#999',
transition: 'color 0.1s ease-in-out'
},
'.uk-totop:hover': { color: '#666' },
'.uk-totop:active': { color: '#333' }
};
export const addHooks = (args) => {
const { hooks } = args;
const defaultHooks = {
'hook-totop': {},
'hook-hover': {},
'hook-active': {},
'hook-misc': {}
};
const _hooks = merge(defaultHooks, hooks);
return {
'.uk-totop': {
..._hooks['hook-totop']
},
'.uk-totop:hover': {
..._hooks['hook-hover']
},
'.uk-totop:active': {
..._hooks['hook-active']
},
..._hooks['hook-misc']
};
};