Skip to content

Commit

Permalink
temp(*): fix adaptor render
Browse files Browse the repository at this point in the history
  • Loading branch information
myronliu347 committed Dec 3, 2019
1 parent 42c49c4 commit 8f8ae34
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/date-picker/adaptor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ export default {
adaptor: ({ shape, state, size, type, width, label, placeholder = '', style = {}, ...others }) => {
const now = moment();
style = {
minWidth: width,
width,
...style,
}
};

if (shape === 'range') {
return (
Expand Down
8 changes: 4 additions & 4 deletions docs/number-picker/adaptor/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ export default {
name: 'state',
label: 'Status',
type: Types.enum,
options: ['normal', 'disabled'],
default: 'normal'
options: ['normal', 'hover', 'disabled'],
default: 'hover'
}, {
name: 'width',
type: Types.number,
Expand All @@ -31,7 +31,7 @@ export default {
default: 1
}]
}),
adaptor: ({ level, size, state, width, value, style, ...others }) => {
return <NumberPicker {...others} style={{ minWidth: width, ...style }} disabled={state === 'disabled'} value={value} size={size} type={level} />
adaptor: ({ level, size, state, width, value, style, className, ...others }) => {
return <NumberPicker className={`${className} ${state === 'hover' ? 'hover' : ''}`} {...others} style={{ minWidth: width, ...style }} disabled={state === 'disabled'} value={value} size={size} type={level} />
}
};
3 changes: 2 additions & 1 deletion src/number-picker/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@
display: block;
}

&:hover #{$number-picker-prefix}-handler {
&:hover #{$number-picker-prefix}-handler,
&.hover #{$number-picker-prefix}-handler {
opacity: 1;
}

Expand Down

0 comments on commit 8f8ae34

Please sign in to comment.