Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Emotion] Convert EuiIcon #5967

Merged
merged 30 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
6d02f3e
Attempt to convert EuiIcon class comp to functional comp
elizabetdev Jun 14, 2022
f9337d2
Merge remote-tracking branch 'upstream/main' into emotion-icon
elizabetdev Jun 16, 2022
236007d
Reverting to class comp. Better styles. Deleting sass icon files.
elizabetdev Jun 17, 2022
f32b33b
Merge remote-tracking branch 'upstream/main' into emotion-icon
elizabetdev Jun 17, 2022
0801a19
Adding css class name in use
elizabetdev Jun 17, 2022
0fa667b
Update test
elizabetdev Jun 17, 2022
09cbbbe
Removing sass-lint important comments
elizabetdev Jun 20, 2022
571039d
Adding shouldRenderCustomStyles
elizabetdev Jun 20, 2022
d47ccba
Fix/imporve appendIconComponentCache tests
cee-chen Jun 20, 2022
412aed9
Showing props table
elizabetdev Jun 20, 2022
8b18907
Renaming icon map and better `named_colors` types
elizabetdev Jun 21, 2022
d54c4fc
Fix playground
elizabetdev Jun 21, 2022
5482bb1
Removing `console.log({ docgenInfo });`
elizabetdev Jun 21, 2022
21fdcb1
Passing custom color to Emotion
elizabetdev Jun 21, 2022
8ab9593
Removing background color on `focus`
elizabetdev Jun 21, 2022
bf9e5e9
Merge branch 'main' into emotion-icon
cee-chen Jun 27, 2022
94003fe
Remove need for IconProps docs workaround
cee-chen Jun 27, 2022
c398c4a
[PR feedback] Clean up ghost/text selectors as well as Elastic-logo s…
cee-chen Jun 27, 2022
59ccf7a
[PR feedback] comment cleanup
cee-chen Jun 27, 2022
dd53f03
[PR feedback] Export simplification
cee-chen Jun 27, 2022
c4861d0
Merge remote-tracking branch 'upstream/main' into emotion-icon
elizabetdev Jun 28, 2022
3b57233
Re-adding custom colors as `style`
elizabetdev Jun 28, 2022
509b890
Renamed `euiIconSizes` to `euiFormControlIconSizes` and moved to form…
elizabetdev Jun 28, 2022
591acab
Removing underscore from functions and variables
elizabetdev Jun 28, 2022
193d9e3
Removing unused `.euiIcon:focus` styles. Adding comments.
elizabetdev Jun 28, 2022
ae58c9d
Adding `data-is-loaded` and `data-is-loading` attributes
elizabetdev Jun 28, 2022
f07dd2c
Update upcoming_changelogs/5967.md
elizabetdev Jun 28, 2022
8ed6ece
Update src/components/icon/icon.tsx
elizabetdev Jun 28, 2022
2fcd282
Adding `customColor` to show in className
elizabetdev Jun 28, 2022
2466cba
Fixing path in `creating-icons` wiki
elizabetdev Jun 28, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src-docs/src/views/icon/playground.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ export default () => {
const docgenInfo = Array.isArray(EuiIcon.__docgenInfo)
? EuiIcon.__docgenInfo[0]
: EuiIcon.__docgenInfo;
const propsToUse = propUtilityForPlayground(docgenInfo.props);

const propsToUse = propUtilityForPlayground(docgenInfo.props, true);

propsToUse.type = iconValidator({ ...propsToUse.type }, 'grid');

Expand Down
2 changes: 1 addition & 1 deletion src/components/badge/badge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export type EuiBadgeProps = {
/**
* Props passed to the close button.
*/
closeButtonProps?: Partial<PropsOf<EuiIcon>>;
closeButtonProps?: Partial<PropsOf<typeof EuiIcon>>;
} & CommonProps &
ExclusiveUnion<WithIconOnClick, {}> &
ExclusiveUnion<
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
@import '../../icon/variables';

.euiFormControlLayout {
// Let the height expand as needed
@include euiFormControlSize($includeAlternates: true);

$iconSize: map-get($euiIconSizes, 'medium');
$iconSize: map-get($euiFormControlIconSizes, 'medium');
$iconPadding: $euiFormControlPadding;
$marginBetweenIcons: $euiFormControlPadding / 2;

Expand All @@ -16,7 +14,7 @@
padding-right: $iconPadding + ($iconSize + $marginBetweenIcons) * $i;

&[class*='compressed'] {
$iconSizeCompressed: map-get($euiIconSizes, 'small');
$iconSizeCompressed: map-get($euiFormControlIconSizes, 'small');
$iconPaddingCompressed: $euiFormControlCompressedPadding;

padding-right: $iconPaddingCompressed + ($iconSizeCompressed + $marginBetweenIcons) * $i;
Expand Down
Loading