-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
website: Update avatar documentation & demos (#963)
- Loading branch information
Showing
11 changed files
with
415 additions
and
36 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,34 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { AvatarGroup, Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<AvatarGroup stacked={false} iconSize='x-large'> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
</AvatarGroup> | ||
); | ||
}; |
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,34 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { AvatarGroup, Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<AvatarGroup animated iconSize='x-large'> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
</AvatarGroup> | ||
); | ||
}; |
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,76 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { AvatarGroup, Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<AvatarGroup iconSize='x-large'> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
</AvatarGroup> | ||
); | ||
}; |
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,34 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { AvatarGroup, Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<AvatarGroup iconSize='x-large'> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
/> | ||
<Avatar abbreviation='MV' backgroundColor={getUserColor('Morgan Vera')} title='Morgan Vera' /> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
/> | ||
</AvatarGroup> | ||
); | ||
}; |
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,19 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
import { SvgUser } from '@itwin/itwinui-icons-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Avatar | ||
abbreviation='AU' | ||
backgroundColor={getUserColor('Anonymous user')} | ||
image={<SvgUser aria-hidden='true' />} | ||
size='x-large' | ||
title='Anonymous user' | ||
/> | ||
); | ||
}; |
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,17 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
size='x-large' | ||
title='Terry Rivers' | ||
/> | ||
); | ||
}; |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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,43 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
gap: 'var(--iui-size-s)', | ||
placeItems: 'center', | ||
}} | ||
> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
size='small' | ||
title='Terry Rivers' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
size='medium' | ||
title='Robin Mercer' | ||
/> | ||
<Avatar | ||
abbreviation='MV' | ||
backgroundColor={getUserColor('Morgan Vera')} | ||
size='large' | ||
title='Morgan Vera' | ||
/> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
size='x-large' | ||
title='Jean Mullins' | ||
/> | ||
</div> | ||
); | ||
}; |
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,47 @@ | ||
/*--------------------------------------------------------------------------------------------- | ||
* Copyright (c) Bentley Systems, Incorporated. All rights reserved. | ||
* See LICENSE.md in the project root for license terms and full copyright notice. | ||
*--------------------------------------------------------------------------------------------*/ | ||
import * as React from 'react'; | ||
import { Avatar, getUserColor } from '@itwin/itwinui-react'; | ||
|
||
export default () => { | ||
return ( | ||
<div | ||
style={{ | ||
display: 'flex', | ||
gap: 'var(--iui-size-s)', | ||
placeItems: 'center', | ||
}} | ||
> | ||
<Avatar | ||
abbreviation='TR' | ||
backgroundColor={getUserColor('Terry Rivers')} | ||
title='Terry Rivers' | ||
size='x-large' | ||
status='online' | ||
/> | ||
<Avatar | ||
abbreviation='RM' | ||
backgroundColor={getUserColor('Robin Mercer')} | ||
title='Robin Mercer' | ||
size='x-large' | ||
status='away' | ||
/> | ||
<Avatar | ||
abbreviation='JM' | ||
backgroundColor={getUserColor('Jean Mullins')} | ||
title='Jean Mullins' | ||
size='x-large' | ||
status='busy' | ||
/> | ||
<Avatar | ||
abbreviation='AM' | ||
backgroundColor={getUserColor('Ashley Miles')} | ||
title='Ashley Miles' | ||
size='x-large' | ||
status='offline' | ||
/> | ||
</div> | ||
); | ||
}; |
Oops, something went wrong.