UNPKG

antd

Version:

An enterprise-class UI design language and React components implementation

18 lines 482 B
import React, { useContext } from 'react'; import { PanelPresetsContext } from '../context'; import ColorPresets from './ColorPresets'; const PanelPresets = () => { const { prefixCls, value, presets, onChange } = useContext(PanelPresetsContext); return Array.isArray(presets) ? /*#__PURE__*/React.createElement(ColorPresets, { value: value, presets: presets, prefixCls: prefixCls, onChange: onChange }) : null; }; export default PanelPresets;