Skip to content

Commit cbf9a72

Browse files
committed
feat: v15
1 parent 00cb18a commit cbf9a72

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

src/packages/progress/__tests__/progress.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ test('should render with custom style props', () => {
2727
const { container } = render(
2828
<Progress percent={50} borderRadius="8px" fontSize="16px" showText />
2929
)
30-
const inner = container.querySelector('.nut-progress-text-inner')
30+
const inner = container.querySelector('.nut-progress-text')
3131
expect(inner).toHaveStyle({
3232
fontSize: '16px',
3333
})

src/packages/progress/progress.taro.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,10 @@ export const Progress: FunctionComponent<
233233
/>
234234
</View>
235235
{effectiveShowText && (
236-
<View className={`${classPrefix}-text`}>
236+
<View
237+
className={`${classPrefix}-text`}
238+
style={{ fontSize: fontSize && parseInt(fontSize.toString()) }}
239+
>
237240
{children || `${percent}%`}
238241
</View>
239242
)}

src/packages/progress/progress.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,12 @@ export const Progress: FunctionComponent<
148148
/>
149149
</div>
150150
{showText && (
151-
<div className={`${classPrefix}-text`}>{children || `${percent}%`}</div>
151+
<div
152+
className={`${classPrefix}-text`}
153+
style={{ fontSize: fontSize && parseInt(fontSize.toString()) }}
154+
>
155+
{children || `${percent}%`}
156+
</div>
152157
)}
153158
</div>
154159
)

0 commit comments

Comments
 (0)