mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 02:59:04 +08:00
fix: input should have correct padding with controlHeight (#45048)
* fix: input should have correct padding with controlHeight * chore: update snapshot * chore: update snapshot
This commit is contained in:
parent
3ffe70ae4e
commit
54a2df3f53
@ -1,3 +1,5 @@
|
||||
import { extendTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
extendTest('input');
|
||||
extendTest('input', {
|
||||
skip: ['component-token.tsx'],
|
||||
});
|
||||
|
@ -1,7 +1,9 @@
|
||||
import * as React from 'react';
|
||||
import demoTest, { rootPropsTest } from '../../../tests/shared/demoTest';
|
||||
|
||||
demoTest('input');
|
||||
demoTest('input', {
|
||||
skip: ['component-token.tsx'],
|
||||
});
|
||||
|
||||
rootPropsTest(
|
||||
'input',
|
||||
|
7
components/input/demo/component-token.md
Normal file
7
components/input/demo/component-token.md
Normal file
@ -0,0 +1,7 @@
|
||||
## zh-CN
|
||||
|
||||
token debug
|
||||
|
||||
## en-US
|
||||
|
||||
token debug
|
10
components/input/demo/component-token.tsx
Normal file
10
components/input/demo/component-token.tsx
Normal file
@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
import { ConfigProvider, Input } from 'antd';
|
||||
|
||||
const App: React.FC = () => (
|
||||
<ConfigProvider theme={{ token: { controlHeight: 28 } }}>
|
||||
<Input placeholder="Basic usage" />
|
||||
</ConfigProvider>
|
||||
);
|
||||
|
||||
export default App;
|
@ -40,6 +40,7 @@ A basic widget for getting the user input is a text field. Keyboard and mouse ca
|
||||
<code src="./demo/align.tsx" debug>Text Align</code>
|
||||
<code src="./demo/textarea-resize.tsx" debug>TextArea</code>
|
||||
<code src="./demo/debug-addon.tsx" debug>debug Pre / Post tab</code>
|
||||
<code src="./demo/component-token.tsx" debug>debug token</code>
|
||||
|
||||
## API
|
||||
|
||||
|
@ -41,6 +41,7 @@ demo:
|
||||
<code src="./demo/align.tsx" debug>文本对齐</code>
|
||||
<code src="./demo/textarea-resize.tsx" debug>文本域</code>
|
||||
<code src="./demo/debug-addon.tsx" debug>debug 前置/后置标签</code>
|
||||
<code src="./demo/component-token.tsx" debug>debug token</code>
|
||||
|
||||
## API
|
||||
|
||||
|
@ -1032,7 +1032,7 @@ export const initComponentToken = (token: GlobalToken): SharedComponentToken =>
|
||||
return {
|
||||
paddingBlock: Math.max(
|
||||
Math.round(((controlHeight - fontSize * lineHeight) / 2) * 10) / 10 - lineWidth,
|
||||
3,
|
||||
0,
|
||||
),
|
||||
paddingBlockSM: Math.max(
|
||||
Math.round(((controlHeightSM - fontSize * lineHeight) / 2) * 10) / 10 - lineWidth,
|
||||
|
Loading…
Reference in New Issue
Block a user