UNPKG

@wordpress/components

Version:
36 lines (34 loc) 1.06 kB
import _extends from "@babel/runtime/helpers/esm/extends"; import { createElement } from "@wordpress/element"; /** * WordPress dependencies */ import { __ } from '@wordpress/i18n'; import { Icon, chevronRight } from '@wordpress/icons'; import { ColorIndicator } from '@wordpress/components'; /** * Internal dependencies */ import Cell from './cell'; import styles from './styles.scss'; export default function BottomSheetColorCell(props) { const { color, withColorIndicator = true, ...cellProps } = props; return createElement(Cell, _extends({}, cellProps, { accessibilityRole: 'button', accessibilityHint: /* translators: accessibility text (hint for moving to color settings) */ __('Double tap to go to color settings'), editable: false, value: withColorIndicator && !color && __('Default') }), withColorIndicator && color && createElement(ColorIndicator, { color: color, style: styles.colorCircle }), createElement(Icon, { icon: chevronRight })); } //# sourceMappingURL=color-cell.native.js.map