@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
28 lines (27 loc) • 911 B
JavaScript
"use client";
import { useContext } from 'react';
import clsx from 'clsx';
import E from "../Element.js";
import Context from "../../shared/Context.js";
import withComponentMarkers from "../../shared/helpers/withComponentMarkers.js";
import { jsx as _jsx } from "react/jsx-runtime";
const Ul = ({
nested,
inside,
outside,
...props
} = {}) => {
var _context$theme;
const context = useContext(Context);
return _jsx(E, {
as: "ul",
...props,
className: clsx(props.className, nested && 'dnb-ul--nested', inside && 'dnb-ul--inside', outside && 'dnb-ul--outside', (context === null || context === void 0 || (_context$theme = context.theme) === null || _context$theme === void 0 ? void 0 : _context$theme.surface) === 'dark' && 'dnb-ul--surface-dark'),
skeleton: false
});
};
withComponentMarkers(Ul, {
_supportsSpacingProps: true
});
export default Ul;
//# sourceMappingURL=Ul.js.map