Skip to content

Commit

Permalink
chore: added docs for avatar component
Browse files Browse the repository at this point in the history
  • Loading branch information
harish-viswa committed Jan 24, 2025
1 parent 4522bb7 commit 4fc8e56
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 47 deletions.
50 changes: 50 additions & 0 deletions apps/portal/src/content/docs/components/avatar.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
title: Avatar
description: Avatar component
---

An image element with a fallback for representing the image

import { DocsPage } from "@/components/docs-page";
import { Avatar, AvatarImage, AvatarFallback } from "@harnessio/ui/components";
import { Badge } from "@harnessio/ui/components";

<DocsPage.ComponentExample
client:only
code={`<div className="flex w-full justify-center">
<Avatar size={10}>
<AvatarImage src="https://github.com/shadcn.png" alt="Avatar image" />
<AvatarFallback>JD</AvatarFallback>
</Avatar>
</div>`}
/>

## Usage

```typescript jsx
import { Avatar } from '@harnessio/ui/components'

//...

return (
<Avatar size={10}>
<AvatarImage src="https://github.com/shadcn.png" alt="Avatar image" />
<AvatarFallback>JD</AvatarFallback>
</Avatar>
)
```

## Anatomy

Coming soon.

```typescript jsx
<Avatar>
<AvatarImage/>
<AvatarFallback />
</Avatar>
```

## API Reference

<Badge theme="emphasis">Coming soon</Badge>
47 changes: 0 additions & 47 deletions apps/portal/src/content/docs/soon/avatar.mdx

This file was deleted.

0 comments on commit 4fc8e56

Please sign in to comment.