Update IconType and its proptype usage#1913
Merged
chandlerprall merged 3 commits intoelastic:feature/dynamic-euiiconfrom May 7, 2019
Merged
Update IconType and its proptype usage#1913chandlerprall merged 3 commits intoelastic:feature/dynamic-euiiconfrom
chandlerprall merged 3 commits intoelastic:feature/dynamic-euiiconfrom
Conversation
… the EuiIcon IconType proptype
cchaos
reviewed
May 2, 2019
| export type IconType = EuiIconType | string | ReactElement; | ||
|
|
||
| export const IconPropType = PropTypes.oneOfType([ | ||
| PropTypes.string, |
Contributor
There was a problem hiding this comment.
Will this bust IDE auto suggest because it no longer knows that the strings that are accepted also include the enums?
Contributor
Author
There was a problem hiding this comment.
WebStorm still autosuggests/completes the available string constants, both when used internally by another EUI component and when used by a consuming application.
thompsongl
approved these changes
May 3, 2019
Contributor
thompsongl
left a comment
There was a problem hiding this comment.
Code looks good. Generated eui.d.ts locally and it also looks good
…Box for IE11 compat
chandlerprall
added a commit
that referenced
this pull request
May 7, 2019
…rnal urls (#1924) * Feature/icon breakapart (#1856) * dynamic import * Make the icon kinda work * progress * generate tsx from svg * Build and commit icons TSX * Updated Icon snapshots * Updated EuiIcon build to again work in dependant projects * Create a single eui.js build, bundling EuiIcon's dynamic import into the build * Tests are passing * Add a loading class to EuiIcon * Added -isLoaded and using animations for fading * update snapshots * Remove background color from isLoaded state * PR feedback * Docs for EuiIcon new abilities (#1889) Add docs for the custom svg abilities in EuiIcon * DOCS ONLY: Allow multiple snippets (#1908) * Update IconType and its proptype usage (#1913) * Expand IconType to include string * Update EuiIcon IconType to include Element, fix some TS issues, widen the EuiIcon IconType proptype * Swap Vim example logo out for SVG example logo, which contains a viewBox for IE11 compat * changelog
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes
IconTypeto acceptReactElements,EuiIconprovides a proptype forIconTypefor usage by other components.