UNPKG

@react-vant-next/campaign

Version:

React Mobile UI Components based on Vant UI - Next Generation

23 lines (20 loc) 1 kB
import { jsxs, jsx } from 'react/jsx-runtime'; import { BORDER_BOTTOM } from '@react-vant-next/ui'; import { createNamespace } from '@react-vant-next/utils'; import cls from 'clsx'; const [bem] = createNamespace("sku-row"); const SkuRow = (props) => { const { skuRow } = props; const renderTitle = () => { return (jsxs("div", { className: cls(bem("title")), children: [skuRow.k, skuRow.is_multiple && (jsx("span", { className: cls(bem("title-multiple")), children: "\uFF08\u53EF\u591A\u9009\uFF09" }))] })); }; const renderContent = () => { const { largeImageMode } = skuRow; return largeImageMode ? (jsx("div", { className: cls(bem("scroller")), children: jsx("div", { className: cls(bem("row")), children: props.children }) })) : (props.children); }; return (jsxs("div", { className: cls(bem(), BORDER_BOTTOM), children: [renderTitle(), renderContent()] })); }; export { SkuRow as default }; //# sourceMappingURL=SkuRow.js.map