UNPKG

@coreui/react-pro

Version:

UI Components Library for React.js

19 lines (16 loc) 500 B
'use strict'; /** * 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); }; exports.resolveChipValue = resolveChipValue; //# sourceMappingURL=utils.js.map