Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions packages/components/src/form-item/style/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,14 @@ import { getGridStyle } from './grid'
import { genOtherStyle } from './other'

const genSmallStyle: GenerateStyle = (token) => {
const { componentCls, antCls, controlHeightSM, marginLG, fontSizeSM } = token
const {
componentCls,
antCls,
controlHeightSM,
marginLG,
fontSizeSM,
lineHeightSM,
} = token
return {
fontSize: fontSizeSM,
lineHeight: controlHeightSM,
Expand All @@ -20,7 +27,7 @@ const genSmallStyle: GenerateStyle = (token) => {
[`${componentCls}-control-content`]: {
' &-component': {
minHeight: controlHeightSM - 4,
lineHeight: `${controlHeightSM}px`,
lineHeight: lineHeightSM,
},
},

Expand Down Expand Up @@ -147,6 +154,7 @@ const genLargeStyle: GenerateStyle = (token) => {
controlHeightLG,
controlHeightSM,
marginLG,
lineHeightLG,
} = token
return {
fontSize: fontSizeLG,
Expand All @@ -163,7 +171,7 @@ const genLargeStyle: GenerateStyle = (token) => {
[`${componentCls}-control-content`]: {
' &-component': {
minHeight: controlHeightLG - 2,
lineHeight: `${controlHeightLG + 2}px`,
lineHeight: lineHeightLG,
},
},

Expand Down Expand Up @@ -302,8 +310,14 @@ const genLargeStyle: GenerateStyle = (token) => {
}

const genLableStyle: GenerateStyle = (token) => {
const { componentCls, controlHeight, controlHeightSM, marginLG, marginSM } =
token
const {
componentCls,
controlHeight,
controlHeightSM,
marginLG,
marginSM,
lineHeight,
} = token
return {
lineHeight: `${controlHeight}px`,
minHeight: controlHeight - 2,
Expand Down Expand Up @@ -364,7 +378,7 @@ const genLableStyle: GenerateStyle = (token) => {
'&-component': {
width: '100%',
minHeight: controlHeight - 2,
lineHeight: `${controlHeight}px`,
lineHeight: lineHeight,

'&-has-feedback-icon': {
flex: 1,
Expand Down