Skip to content

Commit 9990bda

Browse files
committed
feat: Remove Progress component
BREAKING CHANGE: Progress has been removed. Import CircularProgress or LinearProgress comp as usual instead `import LinearProgress from 'cozy-ui/transpiled/react/LinearProgress'`
1 parent 2456a9b commit 9990bda

File tree

6 files changed

+51
-35
lines changed

6 files changed

+51
-35
lines changed

docs/styleguide.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ module.exports = {
2222
'../react/Buttons',
2323
'../react/Checkbox',
2424
'../react/Chips',
25+
'../react/CircularProgress',
2526
'../react/Dialog',
2627
'../react/Divider',
2728
'../react/DropdownButton',
@@ -32,6 +33,7 @@ module.exports = {
3233
'../react/Icon',
3334
'../react/IconButton',
3435
'../react/Labs/IconGrid',
36+
'../react/LinearProgress',
3537
'../react/List',
3638
'../react/ListItem',
3739
'../react/ListItemText',
@@ -40,7 +42,6 @@ module.exports = {
4042
'../react/Paper',
4143
'../react/PasswordField',
4244
'../react/PointerAlert',
43-
'../react/Progress',
4445
'../react/ProgressionBanner',
4546
'../react/Radios',
4647
'../react/SearchBar',

react/CircularProgress/Readme.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Circular progress
2+
3+
```jsx
4+
import useProgression from 'cozy-ui/transpiled/react/helpers/useProgression'
5+
import Variants from 'cozy-ui/docs/components/Variants'
6+
import CircularProgress from 'cozy-ui/transpiled/react/CircularProgress'
7+
8+
const { progression } = useProgression()
9+
10+
const initialVariants = [
11+
{ withValue: true }
12+
]
13+
14+
;
15+
16+
<Variants initialVariants={initialVariants}>{
17+
variant => (
18+
<CircularProgress
19+
variant={variant.withValue ? "determinate" : undefined}
20+
value={variant.withValue ? progression : undefined}
21+
/>
22+
)
23+
}</Variants>
24+
```

react/LinearProgress/Readme.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
### Linear progress
2+
3+
```jsx
4+
import useProgression from 'cozy-ui/transpiled/react/helpers/useProgression'
5+
import Variants from 'cozy-ui/docs/components/Variants'
6+
import LinearProgress from 'cozy-ui/transpiled/react/LinearProgress'
7+
8+
const { progression } = useProgression()
9+
10+
const initialVariants = [
11+
{ withValue: true }
12+
]
13+
14+
;
15+
16+
<Variants initialVariants={initialVariants}>{
17+
variant => (
18+
<LinearProgress
19+
variant={variant.withValue ? "determinate" : undefined}
20+
value={variant.withValue ? progression : undefined}
21+
/>
22+
)
23+
}</Variants>
24+
```

react/Progress/Readme.md

Lines changed: 0 additions & 31 deletions
This file was deleted.

react/Progress/index.js

Lines changed: 0 additions & 2 deletions
This file was deleted.

react/ProgressionBanner/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import PropTypes from 'prop-types'
22
import React from 'react'
33

44
import Alert from '../Alert'
5-
import { LinearProgress } from '../Progress'
5+
import LinearProgress from '../LinearProgress'
66
import Typography from '../Typography'
77
import { useBreakpoints } from '../providers/Breakpoints'
88
import { withStyles } from '../styles'

0 commit comments

Comments
 (0)