tharikida-ui
Version:
A modern, lightweight React UI component library with built-in theming, accessibility, and full TypeScript support. Create beautiful, responsive, and customizable web apps faster with ready-to-use components for any project.
31 lines (30 loc) • 1.48 kB
JavaScript
"use client";
import { jsx as _jsx } from "react/jsx-runtime";
import { useTheme } from "../../theme/ThemeProvider";
const List = ({ children, styles, className = "", cornerRadius, backgroundColor, borderColor, borderWidth, borderStyle, fontFamily, fontSize, fontWeight, transitionDuration, spacingfactor, }) => {
const theme = useTheme();
const t = {
cornerRadius: cornerRadius !== undefined ? cornerRadius : theme.cornerRadius,
backgroundColor: backgroundColor || theme.backgroundColor,
borderColor: borderColor || theme.borderColor,
borderWidth: borderWidth ?? theme.borderWidth,
borderStyle: borderStyle ?? theme.borderStyle,
fontFamily: fontFamily || theme.fontFamily,
fontSize: fontSize || theme.fontSize,
fontWeight: fontWeight || theme.fontWeight,
transitionDuration: transitionDuration || theme.transitionDuration,
spacingfactor: spacingfactor || theme.spacingfactor,
};
return (_jsx("div", { className: `tharikida-list ${className}`, style: {
border: `${t.borderWidth} ${t.borderStyle} ${t.borderColor}`,
borderRadius: t.cornerRadius,
background: t.backgroundColor,
overflow: "hidden",
fontFamily: t.fontFamily,
fontSize: t.fontSize,
fontWeight: t.fontWeight,
transition: t.transitionDuration,
...styles,
}, children: children }));
};
export default List;