-
Notifications
You must be signed in to change notification settings - Fork 843
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiAvatar] Add letter
casing
prop support and default to capitaliz…
…ing initials (#6739) * [EuiAvatar] Add `casing` prop support and convert default to `capitalize` * Update avatar docs with new `casing` prop + use flex/gap instead of spaces * changelog * Update downstream snapshots * [docs] add snippet * [PR feedback] Default to `uppercase` for user avatars and `none` for spaces * Update snapshots * update changelog
- Loading branch information
Showing
14 changed files
with
184 additions
and
68 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
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 |
---|---|---|
@@ -1,31 +1,39 @@ | ||
import React from 'react'; | ||
|
||
import { EuiAvatar, EuiTitle, EuiSpacer } from '../../../../src/components'; | ||
import { | ||
EuiAvatar, | ||
EuiTitle, | ||
EuiSpacer, | ||
EuiFlexGroup, | ||
} from '../../../../src/components'; | ||
|
||
export default () => ( | ||
<div> | ||
<> | ||
<EuiTitle size="xs"> | ||
<h3>Single vs multi-word</h3> | ||
</EuiTitle> | ||
<EuiSpacer /> | ||
<EuiAvatar name="Single" /> | ||
  | ||
<EuiAvatar name="Two Words" /> | ||
  | ||
<EuiAvatar name="More Than Two Words" /> | ||
  | ||
<EuiAvatar name="lowercase words" /> | ||
<EuiFlexGroup responsive={false} gutterSize="xs"> | ||
<EuiAvatar name="Single" /> | ||
<EuiAvatar name="Two Words" /> | ||
<EuiAvatar name="More Than Two Words" /> | ||
<EuiAvatar name="lower case" casing="lowercase" /> | ||
</EuiFlexGroup> | ||
<EuiSpacer /> | ||
<EuiTitle size="xs"> | ||
<h4>Custom</h4> | ||
<h3>Custom</h3> | ||
</EuiTitle> | ||
<EuiSpacer /> | ||
<EuiAvatar name="Kibana" initialsLength={2} /> | ||
  | ||
<EuiAvatar name="Leonardo Dude" initialsLength={1} /> | ||
  | ||
<EuiAvatar name="Not provided" initials="?" /> | ||
  | ||
<EuiAvatar name="Engineering User" initials="En" initialsLength={2} /> | ||
</div> | ||
<EuiFlexGroup responsive={false} gutterSize="xs"> | ||
<EuiAvatar name="Kibana" initialsLength={2} casing="capitalize" /> | ||
<EuiAvatar name="Leonardo Dude" initialsLength={1} /> | ||
<EuiAvatar name="Not provided" initials="?" /> | ||
<EuiAvatar | ||
name="Engineering User" | ||
initials="En" | ||
casing="none" | ||
initialsLength={2} | ||
/> | ||
</EuiFlexGroup> | ||
</> | ||
); |
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
Oops, something went wrong.