diff --git a/.yarn/versions/c9fc51b8.yml b/.yarn/versions/c9fc51b8.yml new file mode 100644 index 000000000..c478fb5cc --- /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 11ff16826..0555c5fd1 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 f072988f4..1a3de1832 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\`.`; }