mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-12-03 04:30:06 +08:00
feat: Add Min-Width Style Variables for Switch Component (#20829)
* chore: Export form typescript interface * Feat -- Min-Width Style Variables for Switch Component Implementation of feature request from @LuisRodriguezLD Co-authored-by: 二货机器人 <smith3816@gmail.com>
This commit is contained in:
parent
29316b4e9d
commit
d70637edba
@ -1,5 +1,5 @@
|
||||
import InternalForm, { useForm, FormInstance } from './Form';
|
||||
import Item from './FormItem';
|
||||
import InternalForm, { useForm, FormInstance, FormProps } from './Form';
|
||||
import Item, { FormItemProps } from './FormItem';
|
||||
import List from './FormList';
|
||||
import { FormProvider } from './context';
|
||||
import warning from '../_util/warning';
|
||||
@ -29,6 +29,6 @@ Form.create = () => {
|
||||
);
|
||||
};
|
||||
|
||||
export { FormInstance };
|
||||
export { FormInstance, FormProps, FormItemProps };
|
||||
|
||||
export default Form;
|
||||
|
@ -631,6 +631,8 @@
|
||||
// ---
|
||||
@switch-height: 22px;
|
||||
@switch-sm-height: 16px;
|
||||
@switch-min-width: 44px;
|
||||
@switch-sm-min-width: 28px;
|
||||
@switch-sm-checked-margin-left: -(@switch-sm-height - 3px);
|
||||
@switch-disabled-opacity: 0.4;
|
||||
@switch-color: @primary-color;
|
||||
|
@ -10,7 +10,7 @@
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
box-sizing: border-box;
|
||||
min-width: 44px;
|
||||
min-width: @switch-min-width;
|
||||
height: @switch-height;
|
||||
line-height: @switch-height - 2px;
|
||||
vertical-align: middle;
|
||||
@ -101,7 +101,7 @@
|
||||
}
|
||||
|
||||
&-small {
|
||||
min-width: 28px;
|
||||
min-width: @switch-sm-min-width;
|
||||
height: @switch-sm-height;
|
||||
line-height: @switch-sm-height - 2px;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user