Skip to content

Commit 31b166c

Browse files
committed
feat(styled kit): add Avatar component
1 parent eb69a66 commit 31b166c

File tree

12 files changed

+95
-5
lines changed

12 files changed

+95
-5
lines changed

.changeset/smooth-crews-retire.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@qwik-ui/styled': patch
3+
---
4+
5+
feat(styled kit): add Avatar component

apps/website/src/_state/component-statuses.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export type ComponentKitsStatuses = {
1212
export const statusByComponent: ComponentKitsStatuses = {
1313
styled: {
1414
Accordion: ComponentStatus.Beta,
15+
Avatar: ComponentStatus.Draft,
1516
Alert: ComponentStatus.Beta,
1617
Badge: ComponentStatus.Beta,
1718
Button: ComponentStatus.Beta,
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import { component$ } from '@builder.io/qwik';
2+
import { Avatar, AvatarFallback, AvatarImage } from '@qwik-ui/styled';
3+
4+
export default component$(() => {
5+
return (
6+
<Avatar>
7+
<AvatarImage src="https://github.com/mhevery.png" alt="@mhevery" />
8+
<AvatarFallback>MA</AvatarFallback>
9+
</Avatar>
10+
);
11+
});
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Qwik UI | Styled Avatar Component
3+
---
4+
5+
import { statusByComponent } from '~/_state/component-statuses';
6+
7+
<StatusBanner status={statusByComponent.styled.Avatar} />
8+
9+
# Avatar
10+
11+
An image element with a fallback for representing the user.
12+
13+
<Showcase name="hero" />
14+
15+
## Installation
16+
17+
```sh
18+
qwik-ui add avatar
19+
```
20+
21+
## Usage
22+
23+
```tsx
24+
import { Avatar } from '@qwik-ui/styled';
25+
```
26+
27+
```tsx
28+
<Avatar />
29+
```

apps/website/src/routes/docs/styled/menu.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
## Components
1010

1111
- [Accordion](/docs/styled/accordion)
12+
- [Avatar](/docs/styled/avatar)
1213
- [Alert](/docs/styled/alert)
1314
- [Badge](/docs/styled/badge)
1415
- [Button](/docs/styled/button)

apps/website/src/routes/docs/styled/modal/index.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
2-
title: Qwik UI | Styled Input Component
2+
title: Qwik UI | Styled Modal Component
33
---
44

55
import { statusByComponent } from '~/_state/component-statuses';
66

7-
<StatusBanner status={statusByComponent.styled.Input} />
7+
<StatusBanner status={statusByComponent.styled.Modal} />
88

99
# Modal
1010

apps/website/src/routes/docs/styled/radio-group/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { statusByComponent } from '~/_state/component-statuses';
66

77
<StatusBanner status={statusByComponent.styled.RadioGroup} />
88

9-
# Popover
9+
# Radio Group
1010

1111
Visually or semantically separates content.
1212

apps/website/src/routes/docs/styled/separator/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { statusByComponent } from '~/_state/component-statuses';
66

77
<StatusBanner status={statusByComponent.styled.Separator} />
88

9-
# Popover
9+
# Separator
1010

1111
Visually or semantically separates content.
1212

apps/website/src/routes/docs/styled/skeleton/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { statusByComponent } from '~/_state/component-statuses';
66

77
<StatusBanner status={statusByComponent.styled.Skeleton} />
88

9-
# Popover
9+
# Skeleton
1010

1111
Visually or semantically separates content.
1212

packages/kit-styled/components-registry.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@
77
"componentFolder": "accordion",
88
"files": ["accordion.tsx"]
99
},
10+
{
11+
"displayName": "Avatar",
12+
"type": "avatar",
13+
"componentFolder": "avatar",
14+
"files": ["avatar.tsx"]
15+
},
1016
{
1117
"displayName": "Alert",
1218
"type": "alert",

0 commit comments

Comments
 (0)