(item)
| 39 | options ? options.map((option) => _.pick(option, ['key', 'value'])) : options |
| 40 | |
| 41 | function renderItemContent(item) { |
| 42 | const { flag, image, text } = item |
| 43 | |
| 44 | // TODO: remove this in v3 |
| 45 | // This maintains compatibility with Shorthand API in v1 as this might be called in "Label.create()" |
| 46 | if (_.isFunction(text)) { |
| 47 | return text |
| 48 | } |
| 49 | |
| 50 | return { |
| 51 | content: ( |
| 52 | <> |
| 53 | {Flag.create(flag)} |
| 54 | {Image.create(image)} |
| 55 | |
| 56 | {text} |
| 57 | </> |
| 58 | ), |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * A dropdown allows a user to select a value from a series of options. |
no outgoing calls
no test coverage detected
searching dependent graphs…