Skip to content

Commit

Permalink
docs: name avatar properly
Browse files Browse the repository at this point in the history
  • Loading branch information
Topener committed Jan 3, 2024
1 parent 4cd1944 commit 631b8f6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 6 deletions.
4 changes: 2 additions & 2 deletions docs/docs/components/alertbar.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,9 @@ As you can see with all the demo's above, we've used the `AlertStack` component
To use the `AlertStack` component, you can simply wrap your `AlertBar` component in the `AlertStack` component. The `AlertStack` component will then take care of the positioning.

```jsx
import { AlertStack, AlertBar } from '@dhis2/ui'
import { AlertStack, AlertBar } from '@dhis2/ui';

;<AlertStack>
<AlertStack>
<AlertBar>...</AlertBar>
<AlertBar>...</AlertBar>
<AlertBar>...</AlertBar>
Expand Down
17 changes: 14 additions & 3 deletions docs/docs/components/avatar.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
title: Avatar
title: User Avatar
id: avatar
---

import { Demo } from '@site/src/components/DemoComponent.jsx'
Expand All @@ -8,9 +9,9 @@ import { UserAvatar } from '@dhis2/ui'

import API from '../../../components/user-avatar/API.md'

# Avatar
# User Avatar

An avatar is a visual icon that represents a user.
A User Avatar is a visual icon that represents a user.

<Demo>
<UserAvatar name="Karimbe Olefeme"/>
Expand Down Expand Up @@ -48,6 +49,16 @@ An avatar is a visual icon that represents a user.

Avatars are available in different sizes. Use the size that works best for the space available and the context.

The Demo above lists the different sizes available. The related JSX is:

```jsx
<UserAvatar extrasmall name="Example Person"/>
<UserAvatar small name="Example Person"/>
<UserAvatar medium name="Example Person"/>
<UserAvatar large name="Example Person"/>
<UserAvatar extralarge name="Example Person"/>
```

## API Reference

<API />
Expand Down
2 changes: 1 addition & 1 deletion docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ const sidebars = {
{
Components: [
'components/alertbar',
'components/avatar',
'components/button',
'components/card',
'components/calendar',
Expand All @@ -68,6 +67,7 @@ const sidebars = {
'components/tag',
'components/tooltip',
'components/transfer',
'components/avatar',
],
},
{
Expand Down

0 comments on commit 631b8f6

Please sign in to comment.