diff --git a/.yarn/versions/c9fc51b8.yml b/.yarn/versions/c9fc51b8.yml new file mode 100644 index 0000000000..c478fb5cca --- /dev/null +++ b/.yarn/versions/c9fc51b8.yml @@ -0,0 +1,5 @@ +releases: + "@radix-ui/react-progress": minor + +declined: + - primitives diff --git a/packages/react/progress/src/Progress.stories.tsx b/packages/react/progress/src/Progress.stories.tsx index 11ff16826a..0555c5fd19 100644 --- a/packages/react/progress/src/Progress.stories.tsx +++ b/packages/react/progress/src/Progress.stories.tsx @@ -38,7 +38,7 @@ export const Chromatic = () => (

Indeterminate

- + / @@ -54,7 +54,7 @@ export const Chromatic = () => (

Indeterminate

- + / diff --git a/packages/react/progress/src/Progress.tsx b/packages/react/progress/src/Progress.tsx index f072988f47..1a3de18323 100644 --- a/packages/react/progress/src/Progress.tsx +++ b/packages/react/progress/src/Progress.tsx @@ -31,7 +31,7 @@ const Progress = React.forwardRef( (props: ScopedProps, forwardedRef) => { const { __scopeProgress, - value: valueProp, + value: valueProp = null, max: maxProp, getValueLabel = defaultGetValueLabel, ...progressProps @@ -140,7 +140,7 @@ function getInvalidValueError(propValue: string, componentName: string) { return `Invalid prop \`value\` of value \`${propValue}\` supplied to \`${componentName}\`. The \`value\` prop must be: - a positive number - less than the value passed to \`max\` (or ${DEFAULT_MAX} if no \`max\` prop is set) - - \`null\` if the progress is indeterminate. + - \`null\` or \`undefined\` if the progress is indeterminate. Defaulting to \`null\`.`; }