@nex-ui/react
Version:
🎉 A beautiful, modern, and reliable React component library.
88 lines (84 loc) • 2.08 kB
JavaScript
'use strict';
var system = require('@nex-ui/system');
const accordionRecipe = system.defineRecipe({
base: {
w: 'full'
},
variants: {
variant: {
outlined: {
border: '1px solid {colors.gray.muted}',
borderRadius: 'md'
}
}
}
});
const accordionItemRecipe = system.defineSlotRecipe({
slots: {
root: {},
heading: {
m: 0,
fs: 18,
minHeight: 48,
fontWeight: 'normal'
},
trigger: {
w: 'full',
h: 'inherit',
minHeight: 'inherit',
textAlign: 'left',
display: 'flex',
background: 'none',
userSelect: 'none',
border: 'none',
outline: 'none',
color: 'inherit',
py: 0,
px: '4',
cursor: 'pointer',
alignItems: 'center',
fs: 'inherit',
justifyContent: 'space-between',
boxSizing: 'border-box',
fontWeight: 'inherit',
_focusVisible: {
outline: 'focusVisibleOutline'
}
},
content: {
px: '4',
py: '2',
fs: 16
},
indicator: {
fs: '1.25rem',
display: 'flex'
}
},
variants: {
disabled: {
true: {
root: {
opacity: 0.5,
pointerEvents: 'none'
}
}
},
variant: {
underlined: {
root: {
borderBottom: '1px solid {colors.gray.muted}'
}
},
outlined: {
root: {
':not(:last-child)': {
borderBottom: '1px solid {colors.gray.muted}'
}
}
}
}
}
});
exports.accordionItemRecipe = accordionItemRecipe;
exports.accordionRecipe = accordionRecipe;