- {function () {
-
- // We render a `
` if we were provided an `on`
- // property, and otherwise show an `` if available.
- switch (true) {
- case on !== null && typeof on !== 'undefined':
- return (
-
- );
- case !!icon:
- return (
-
- );
- default:
- return null;
- }
- }()}
- {meta ? (
-
- {text}
- {meta}
-
- ) :
-
- {text}
-
}
-
- );
- }
-
-};
-
-// Props.
-ComposerOptionsDropdownContentItem.propTypes = {
- active: PropTypes.bool,
- name: PropTypes.string,
- onChange: PropTypes.func,
- onClose: PropTypes.func,
- options: PropTypes.shape({
- icon: PropTypes.string,
- meta: PropTypes.node,
- on: PropTypes.bool,
- text: PropTypes.node,
- }),
-};