|
@ -70,6 +70,7 @@ const Progress = React.forwardRef<HTMLDivElement, ProgressProps>((props, ref) => |
|
|
type = 'line', |
|
|
type = 'line', |
|
|
status, |
|
|
status, |
|
|
format, |
|
|
format, |
|
|
|
|
|
style, |
|
|
...restProps |
|
|
...restProps |
|
|
} = props; |
|
|
} = props; |
|
|
|
|
|
|
|
@ -88,7 +89,11 @@ const Progress = React.forwardRef<HTMLDivElement, ProgressProps>((props, ref) => |
|
|
return status || 'normal'; |
|
|
return status || 'normal'; |
|
|
}, [status, percentNumber]); |
|
|
}, [status, percentNumber]); |
|
|
|
|
|
|
|
|
const { getPrefixCls, direction } = React.useContext<ConfigConsumerProps>(ConfigContext); |
|
|
const { |
|
|
|
|
|
getPrefixCls, |
|
|
|
|
|
direction, |
|
|
|
|
|
progress: progressStyle, |
|
|
|
|
|
} = React.useContext<ConfigConsumerProps>(ConfigContext); |
|
|
const prefixCls = getPrefixCls('progress', customizePrefixCls); |
|
|
const prefixCls = getPrefixCls('progress', customizePrefixCls); |
|
|
const [wrapSSR, hashId] = useStyle(prefixCls); |
|
|
const [wrapSSR, hashId] = useStyle(prefixCls); |
|
|
|
|
|
|
|
@ -167,6 +172,7 @@ const Progress = React.forwardRef<HTMLDivElement, ProgressProps>((props, ref) => |
|
|
[`${prefixCls}-${size}`]: typeof size === 'string', |
|
|
[`${prefixCls}-${size}`]: typeof size === 'string', |
|
|
[`${prefixCls}-rtl`]: direction === 'rtl', |
|
|
[`${prefixCls}-rtl`]: direction === 'rtl', |
|
|
}, |
|
|
}, |
|
|
|
|
|
progressStyle?.className, |
|
|
className, |
|
|
className, |
|
|
rootClassName, |
|
|
rootClassName, |
|
|
hashId, |
|
|
hashId, |
|
@ -175,6 +181,7 @@ const Progress = React.forwardRef<HTMLDivElement, ProgressProps>((props, ref) => |
|
|
return wrapSSR( |
|
|
return wrapSSR( |
|
|
<div |
|
|
<div |
|
|
ref={ref} |
|
|
ref={ref} |
|
|
|
|
|
style={{ ...progressStyle?.style, ...style }} |
|
|
className={classString} |
|
|
className={classString} |
|
|
role="progressbar" |
|
|
role="progressbar" |
|
|
aria-valuenow={percentNumber} |
|
|
aria-valuenow={percentNumber} |
|
|