-
Notifications
You must be signed in to change notification settings - Fork 117
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(avatar): can add icon inside avatar (#1281)
* feat(icon): add icon capability * chore: prettier formatting * feat(icon): add icon prop, icon sizing func, icon to storybook * test(avatar): add tests for icon addition * test: enforce icon only being paste icon * fix: some minor fixes * test: completed icon in avatar tests * chore: add icon dependency * chore: fix eslint errors * chore(icon): minifiy icon-list file * chore(icon): un-minify icon-list file * chore: fix ts lint errors in test file * chore(avatar): adjust & add tests for utils function * test: add more edge case testing for icon prop * test: replace removed snapshot tests * chore: refactor content variant return and add tests * chore: add DOM tests, removed redundant props * chore: update style-props dependency * chore: update icon dependency * chore: fix linting errors * chore: refactor renderAvatarContents to ReactFC AvatarComponents * chore: added changeset for avatar/icon * chore: change to yarn lock Co-authored-by: Glorili Alejandro <galejandro@twilio.com> Co-authored-by: Nora Krantz <nkrantz@twilio.com> Co-authored-by: TheSisb <shadiisber@gmail.com>
- Loading branch information
1 parent
6d3ef1d
commit 3419ff6
Showing
8 changed files
with
241 additions
and
63 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@twilio-paste/avatar': minor | ||
'@twilio-paste/core': minor | ||
--- | ||
|
||
Created an 'icon' prop on Avatar so that users can display Paste icons inside of Avatar components. |
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
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
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
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,9 @@ | ||
import type {IconSize} from '@twilio-paste/style-props'; | ||
import type {GenericIconProps} from '@twilio-paste/icons/esm/types'; | ||
|
||
export interface AvatarProps extends React.HTMLAttributes<'div'> { | ||
name: string; | ||
size: IconSize; | ||
src?: string; | ||
icon?: React.FC<GenericIconProps>; | ||
} |
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.
3419ff6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
paste-theme-designer – ./
paste-theme-designer-git-main-twilio-dsys.vercel.app
paste-theme-designer-twilio-dsys.vercel.app
theming.twilio.design
paste-theme-designer.vercel.app
3419ff6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
paste – ./
paste-twilio-dsys.vercel.app
paste-git-main-twilio-dsys.vercel.app
paste.twilio.design