-
Notifications
You must be signed in to change notification settings - Fork 87
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(avatar): add presence indicator support in avatar component
- Loading branch information
1 parent
5ce126a
commit ce945f2
Showing
10 changed files
with
2,611 additions
and
1,912 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletions
36
core/components/atoms/avatar/__stories__/Presence.story.jsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import * as React from 'react'; | ||
import { Avatar, Row, Column, Text } from '@/index'; | ||
|
||
// CSF format story | ||
export const presence = () => { | ||
const weight = 'strong'; | ||
|
||
return ( | ||
<Row className="w-50"> | ||
<Column> | ||
<Text weight={weight}>Active</Text> | ||
<br /> | ||
<br /> | ||
<Avatar firstName="John" lastName="Doe" presence="active" /> | ||
</Column> | ||
<Column> | ||
<Text weight={weight}>Away</Text> | ||
<br /> | ||
<br /> | ||
<Avatar firstName="John" lastName="Doe" presence="away" /> | ||
</Column> | ||
</Row> | ||
); | ||
}; | ||
|
||
export default { | ||
title: 'Components/Avatar/Avatar/Presence', | ||
component: Avatar, | ||
parameters: { | ||
docs: { | ||
docPage: { | ||
title: 'Avatar', | ||
}, | ||
}, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.