Skip to content

Commit

Permalink
rm useless func
Browse files Browse the repository at this point in the history
  • Loading branch information
hiyuki committed Oct 17, 2024
1 parent 78a6514 commit 7966a2b
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions packages/webpack-plugin/lib/runtime/components/react/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -253,19 +253,6 @@ function transformCalc (styleObj: Record<string, any>, calcKeyPaths: Array<Array
})
}

function transformLineHeight (styleObj: Record<string, any>) {
let { lineHeight } = styleObj
if (typeof lineHeight === 'string' && PERCENT_REGEX.test(lineHeight)) {
const hasFontSize = hasOwn(styleObj, 'fontSize')
if (!hasFontSize) {
warn('The fontSize property could not be read correctly, so the default fontSize of 16 will be used as the basis for calculating the lineHeight!')
}
const fontSize = hasFontSize ? styleObj.fontSize : DEFAULT_FONT_SIZE
lineHeight = (parseFloat(lineHeight) / 100) * fontSize
styleObj.lineHeight = lineHeight
}
}

interface TransformStyleConfig {
enableVar?: boolean
externalVarContext?: Record<string, any>
Expand Down

0 comments on commit 7966a2b

Please sign in to comment.