This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 51
feat(Avatar): added image&label shorthands #270
Merged
Merged
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
f0bb78b
-added image and label shorthands in side the Avatar
ec70fd4
-fixed Avatar test and added changelog record
3d717d1
-updated chat avatar example
6590a97
Merge branch 'master' into feat/avatar-shorthands
1faa500
-updated changelog after merging of the master
5c7c73d
Reverted changes for the status slot. Addressed comments in the PR
47dc0fa
-removed variables check for the shorthands props
0978769
Merge branch 'master' into feat/avatar-shorthands
39041b5
adjust changelog entry to be consistent with the rest
kuzhelov-ms e6c338c
introduce dots for props description
kuzhelov-ms 3a181c0
Merge branch 'master' into feat/avatar-shorthands
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
8 changes: 0 additions & 8 deletions
8
docs/src/examples/components/Avatar/Variations/AvatarExampleAlt.shorthand.tsx
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
docs/src/examples/components/Avatar/Variations/AvatarExampleImage.shorthand.tsx
This file contains hidden or 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,6 @@ | ||
| import React from 'react' | ||
| import { Avatar } from '@stardust-ui/react' | ||
|
|
||
| const AvatarExampleImageShorthand = () => <Avatar image="public/images/avatar/small/matt.jpg" /> | ||
|
|
||
| export default AvatarExampleImageShorthand |
19 changes: 19 additions & 0 deletions
19
docs/src/examples/components/Avatar/Variations/AvatarExampleImageCustomization.shorthand.tsx
This file contains hidden or 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,19 @@ | ||
| import React from 'react' | ||
| import { Avatar, Icon } from '@stardust-ui/react' | ||
|
|
||
| const iconAsImage = (Image, props, children) => { | ||
| return <Icon name="user" circular variables={{ color: 'blue' }} styles={{ fontSize: '16px' }} /> | ||
| } | ||
|
|
||
| const AvatarExampleImageCustomizationShorthand = () => ( | ||
| <> | ||
| <Avatar | ||
| image={{ src: 'public/images/avatar/small/matt.jpg', alt: 'Profile picture of John Doe' }} | ||
| status={{ color: 'green', icon: 'check', title: 'Available' }} | ||
| /> | ||
|   | ||
| <Avatar image={iconAsImage} status={{ color: 'green', icon: 'check', title: 'Available' }} /> | ||
| </> | ||
| ) | ||
|
|
||
| export default AvatarExampleImageCustomizationShorthand |
8 changes: 8 additions & 0 deletions
8
docs/src/examples/components/Avatar/Variations/AvatarExampleLabel.shorthand.tsx
This file contains hidden or 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,8 @@ | ||
| import React from 'react' | ||
| import { Avatar } from '@stardust-ui/react' | ||
|
|
||
| const AvatarExampleLabelShorthand = () => ( | ||
| <Avatar name="John Doe" label={{ variables: { backgroundColor: 'pink' } }} /> | ||
| ) | ||
|
|
||
| export default AvatarExampleLabelShorthand |
This file contains hidden or 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
6 changes: 0 additions & 6 deletions
6
docs/src/examples/components/Avatar/Variations/AvatarExampleSrc.shorthand.tsx
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.