UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

17 lines (15 loc) 469 B
/** * Resolves the value used to identify a chip in a `CChipSet`: its explicit * `value` prop, its text children, or the render index as a last resort. */ const resolveChipValue = (chip, index) => { if (chip.props.value !== undefined) { return chip.props.value; } if (typeof chip.props.children === 'string') { return chip.props.children; } return String(index); }; export { resolveChipValue }; //# sourceMappingURL=utils.js.map