Skip to content

Commit

Permalink
docs(AIChip): add documentation of AI Chip component
Browse files Browse the repository at this point in the history
  • Loading branch information
anuradha9712 committed Jun 4, 2024
1 parent abcada2 commit c58109a
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 0 deletions.
20 changes: 20 additions & 0 deletions docs/src/data/nav/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,26 @@ base: components
menus:
- label: Overview
link: /components/overview/all-components/

- label: AI
link: /components/AIButton/usage/
hideInMobile: true
subMenu: [
{
label: 'AI Buttons',
link: /components/AIButton/usage/
},
{
label: 'AI Chip',
link: /components/AIChip/usage/
},
{
label: 'Sara',
},
{
label: 'Sara Sparkle',
},
]

- label: Action sheet
link: /components/actionSheet/usage/
Expand Down
7 changes: 7 additions & 0 deletions docs/src/pages/components/AIChip/code.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#### Live Demo
<br/>

<Preview name='components-ai-ai-chip-all--all' />

#### Props
<PreviewWithPropTable name='components-ai-ai-chip-all--all' />
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions docs/src/pages/components/AIChip/usage.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
---
title: AI Chip
description: AI Chip, based on Action Chips, enables contextual and dynamic AI actions. It has a distinct appearance to signal users that the action utilizes AI capabilities.
tabs: ['Usage', 'Code']
showMobile: true
keywords: ['Toggle', 'Action Chip', 'Chip']
---

<Preview name='components-ai-ai-chip-all--all' />

### States

AI Chip supports **5 states** - default, hover, active, focus and disabled.

![States - AI chip](./images/states.png)
<Caption>States - AI chip</Caption>

### Structure

#### AI chip

<table style={{width: "100%"}}>
<tbody>
<tr>
<th style={{width:"50%", textAlign: "left"}}>Property</th>
<th style={{width:"50%", textAlign: "left"}}>Value(s)</th>
</tr>
<tr style={{verticalAlign: "top"}}>
<td>Height</td>
<td>24px</td>
</tr>
<tr style={{verticalAlign: "top"}}>
<td>Corner radius</td>
<td>12px</td>
</tr>
</tbody>
</table>

<br />

![ Structure - AI chip](./images/structure.png)
<Caption> Structure - AI chip</Caption>

### Configurations

#### AI Chip

<table style={{width: "100%"}}>
<tbody>
<tr>
<th style={{width:"33%", textAlign: "left"}}>Property</th>
<th style={{width:"33%", textAlign: "left"}}>Value(s)</th>
<th style={{width:"33%", textAlign: "left"}}>Default value</th>
</tr>
<tr style={{verticalAlign: "top"}}>
<td>Label<br/></td>
<td>&#60;label&#62;</td>
<td>-</td>
</tr>
<tr style={{verticalAlign: "top"}}>
<td>Left icon<br/><em>(optional)</em></td>
<td>&#60;icon name&#62;</td>
<td>-</td>
</tr>
</tbody>
</table>

<br />

### Usage

#### AI Chip for AI assisted actions

AI Chip should be used where there are actions that are assisted/powered by AI.

![AI Chip for AI assisted actions](./images/ai-action.png)
<Caption>AI Chip for AI assisted actions</Caption>

0 comments on commit c58109a

Please sign in to comment.