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.
34 lines (33 loc) • 848 B
JavaScript
import merge from 'lodash/merge.js';
export const rules = {
'.uk-tooltip': {
display: 'none',
position: 'absolute',
zIndex: '1030',
'--uk-position-offset': '10px',
'--uk-position-viewport-offset': '10',
top: '0',
boxSizing: 'border-box',
maxWidth: '200px',
padding: '3px 6px',
backgroundColor: '#666',
borderRadius: '2px',
color: '#fff',
fontSize: '12px'
},
'.uk-tooltip.uk-active': { display: 'block' }
};
export const addHooks = (args) => {
const { hooks } = args;
const defaultHooks = {
'hook-tooltip': {},
'hook-misc': {}
};
const _hooks = merge(defaultHooks, hooks);
return {
'.uk-tooltip': {
..._hooks['hook-tooltip']
},
..._hooks['hook-misc']
};
};