Merge pull request #424 from catchonme/master

导出theme注册入口
This commit is contained in:
liaoxuezhi 2020-01-10 09:28:33 +08:00 committed by GitHub
commit 087a0f4f4d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 3 deletions

View File

@ -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() {

View File

@ -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

View File

@ -9,6 +9,7 @@ export interface ColorProps extends FormControlProps {
timeConstrainst?: object;
closeOnSelect?: boolean;
presetColors?: string[];
resetValue?: string;
}
export interface ColorControlState {