Skip to content

Commit 9b2d0b3

Browse files
committed
feat: Remove GhostFileBadge component
BREAKING CHANGE: GhostFileBadge has been removed. Use Badge instead (see commit or doc)
1 parent 58b4822 commit 9b2d0b3

File tree

3 files changed

+25
-42
lines changed

3 files changed

+25
-42
lines changed

docs/styleguide.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ module.exports = {
2828
'../react/DropdownText',
2929
'../react/Empty',
3030
'../react/Fab',
31-
'../react/GhostFileBadge',
3231
'../react/Grid',
3332
'../react/Icon',
3433
'../react/IconButton',

react/GhostFileBadge/Readme.md

Lines changed: 25 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,31 @@
11
Ghost badges are specifically used to indicate that a file in a Cozy is a ghost file — it is not truly in the Cozy (usually it is shared from another instance).
22

33
```jsx
4-
import GhostFileBadge from 'cozy-ui/transpiled/react/GhostFileBadge';
5-
import Icon from 'cozy-ui/transpiled/react/Icon';
6-
import Avatar from 'cozy-ui/transpiled/react/Avatar';
4+
import Badge from 'cozy-ui/transpiled/react/Badge'
5+
import Icon from 'cozy-ui/transpiled/react/Icon'
6+
import Avatar from 'cozy-ui/transpiled/react/Avatar'
77

8-
import FolderIcon from "cozy-ui/transpiled/react/Icons/Folder";
8+
import FolderIcon from "cozy-ui/transpiled/react/Icons/Folder"
99

10-
<p>
11-
<GhostFileBadge badgeContent={<Icon icon={FolderIcon} size="16" />}>
12-
<Avatar size="s">CD</Avatar>
13-
</GhostFileBadge>
14-
</p>
10+
;
11+
12+
<Badge
13+
badgeContent={
14+
<div
15+
className="u-h-auto u-miw-auto"
16+
style={{
17+
padding: "3px",
18+
backgroundColor: "white",
19+
color: "var(--coolGrey)",
20+
border: "1px solid var(--silver)",
21+
borderRadius: "6px"
22+
}}
23+
>
24+
<Icon icon={FolderIcon} size="16" />
25+
</div>
26+
}
27+
anchorOrigin={{ vertical: 'bottom', horizontal: 'right' }}
28+
>
29+
<Avatar size="s">CD</Avatar>
30+
</Badge>
1531
```

react/GhostFileBadge/index.jsx

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

0 commit comments

Comments
 (0)