-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2453 from innovaccer/develop
Develop
- Loading branch information
Showing
85 changed files
with
5,129 additions
and
3,439 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', | ||
}, | ||
}, | ||
}, | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 30 additions & 0 deletions
30
core/components/atoms/avatar/__stories__/statusWithIcon.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,30 @@ | ||
import * as React from 'react'; | ||
import { Avatar, Icon, Tooltip } from '@/index'; | ||
|
||
// CSF format story | ||
export const statusWithIcon = () => { | ||
return ( | ||
<Avatar | ||
lastName="Doe" | ||
firstName="John" | ||
appearance="primary" | ||
status={ | ||
<Tooltip tooltip="Verified" position="top"> | ||
<Icon name="done" size={10} appearance="white" className="p-1 bg-success" /> | ||
</Tooltip> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default { | ||
title: 'Components/Avatar/Avatar/Status/Status With Icon', | ||
component: Avatar, | ||
parameters: { | ||
docs: { | ||
docPage: { | ||
title: 'Avatar', | ||
}, | ||
}, | ||
}, | ||
}; |
31 changes: 31 additions & 0 deletions
31
core/components/atoms/avatar/__stories__/statusWithImage.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,31 @@ | ||
import * as React from 'react'; | ||
import { Avatar, Tooltip } from '@/index'; | ||
import StatusImage from './assets/status-image.png'; | ||
|
||
// CSF format story | ||
export const statusWithImage = () => { | ||
return ( | ||
<Avatar | ||
firstName="Tom" | ||
lastName="Yusuf" | ||
appearance="accent1" | ||
status={ | ||
<Tooltip tooltip="DND" position="top"> | ||
<img width="14px" alt="DND" src={StatusImage} /> | ||
</Tooltip> | ||
} | ||
/> | ||
); | ||
}; | ||
|
||
export default { | ||
title: 'Components/Avatar/Avatar/Status/Status With Image', | ||
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.