import { Canvas, Controls, Meta, Title } from '@storybook/addon-docs/blocks';
import * as IdentityBlockStories from './IdentityBlock.stories';
<Meta of={IdentityBlockStories} name='Usage' />
<Title />
## Purpose
The PDS Identity Block, with the Agent Avatar in place of the human Avatar. An agent avatar with a primary line (for example the agent's name) and a secondary line (for example who it is acting for).
## Usage
Use it in the sidebar identity area of an app layout, or anywhere a compact identity is needed. Set `isSingleLine` for a smaller avatar with just the primary text. Set `isSidebarCollapsed` to show only the avatar.
## Implementation
See the table below for the available props. `avatarProps` goes straight to the Agent Avatar, so `label` is required (screen-reader text that says it is an agent) and `iconName`, `hasHalo` and `shape` pass through. Long text truncates with an ellipsis and shows the full text as a title.
<hr />
<Canvas of={IdentityBlockStories.Default} />
<Controls of={IdentityBlockStories.Default} />
Identity Block
Start from the PDS v2 Identity Block and use the Agent Avatar in place of the human Avatar, as Avatar Label does.
Extends a PDS componentOpen in Storybook