-
Notifications
You must be signed in to change notification settings - Fork 839
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
Update IconType and its proptype usage #1913
Update IconType and its proptype usage #1913
Conversation
… the EuiIcon IconType proptype
export type IconType = EuiIconType | string | ReactElement; | ||
|
||
export const IconPropType = PropTypes.oneOfType([ | ||
PropTypes.string, |
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.
Will this bust IDE auto suggest because it no longer knows that the strings that are accepted also include the enums?
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.
WebStorm still autosuggests/completes the available string constants, both when used internally by another EUI component and when used by a consuming application.
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.
Code looks good. Generated eui.d.ts
locally and it also looks good
…Box for IE11 compat
…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
Summary
Fixes
IconType
to acceptReactElement
s,EuiIcon
provides a proptype forIconType
for usage by other components.