forked from p96170835/amis
commit
9916a8a8d4
|
@ -28,6 +28,7 @@ export interface ColorProps {
|
|||
classnames: ClassNamesFn;
|
||||
onChange: (value: any) => void;
|
||||
presetColors?: string[];
|
||||
resetValue?: string;
|
||||
}
|
||||
|
||||
export interface ColorControlState {
|
||||
|
@ -122,8 +123,8 @@ export class ColorControl extends React.PureComponent<
|
|||
}
|
||||
|
||||
clearValue() {
|
||||
const onChange = this.props.onChange;
|
||||
onChange('');
|
||||
const {onChange, resetValue} = this.props;
|
||||
onChange(resetValue || '');
|
||||
}
|
||||
|
||||
handleClick() {
|
||||
|
|
|
@ -184,7 +184,7 @@ import {addRule, str2rules} from './utils/validations';
|
|||
import {normalizeOptions} from './components/Select';
|
||||
import {OptionsControl} from './renderers/Form/Options';
|
||||
|
||||
import {classnames, getClassPrefix, setDefaultTheme} from './theme';
|
||||
import {classnames, getClassPrefix, setDefaultTheme, theme} from './theme';
|
||||
const classPrefix = getClassPrefix();
|
||||
|
||||
export {
|
||||
|
@ -256,6 +256,7 @@ export {
|
|||
Scoped,
|
||||
ScopedContext,
|
||||
setDefaultTheme,
|
||||
theme,
|
||||
classPrefix,
|
||||
getClassPrefix,
|
||||
classnames
|
||||
|
|
|
@ -9,6 +9,7 @@ export interface ColorProps extends FormControlProps {
|
|||
timeConstrainst?: object;
|
||||
closeOnSelect?: boolean;
|
||||
presetColors?: string[];
|
||||
resetValue?: string;
|
||||
}
|
||||
|
||||
export interface ColorControlState {
|
||||
|
|
Loading…
Reference in New Issue