@ozen-ui/kit
Version:
React component library
20 lines (19 loc) • 1.25 kB
JavaScript
import { __assign, __rest } from "tslib";
import React, { forwardRef } from 'react';
import { useThemeProps } from '../../../../hooks/useThemeProps';
import { cn } from '../../../../utils/classname';
import { ListCardItemItemCarcass } from '../../components';
import { useListCardItemContext } from '../../ListCardItemContext';
export var cnListCardItemLeadingItem = cn('ListCardItemLeadingItem');
export var ListCardItemLeadingItem = forwardRef(function (inProps, ref) {
var props = useThemeProps({
props: inProps,
name: 'ListCardItemLeadingItem',
});
var children = props.children, className = props.className, contentProps = props.contentProps, other = __rest(props, ["children", "className", "contentProps"]);
var size = useListCardItemContext().size;
return (React.createElement(ListCardItemItemCarcass, __assign({}, other, { className: cnListCardItemLeadingItem({ size: size }, [className]), contentProps: __assign(__assign({}, contentProps), { className: cnListCardItemLeadingItem('Content', [
contentProps === null || contentProps === void 0 ? void 0 : contentProps.className,
]) }), ref: ref }), children));
});
ListCardItemLeadingItem.displayName = 'ListCardItemLeadingItem';