-
Notifications
You must be signed in to change notification settings - Fork 841
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
Docs for EuiIcon new abilities #1889
Conversation
K, docs ready for review. Added various snippets, copy commands and the svg examples. @chandlerprall is looking into |
I think it should be the string name for couple of reasons: a. The snippet tab should hold the easily copyable component code |
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.
Mainly a couple word edits. But also looks like we need to update all the iconType
prop types in other components to allow the new list.
I also will have a follow-up PR for this branch to allow for multiple snippets since that'd be really useful here.
<EuiButton iconType="https://upload.wikimedia.org/wikipedia/commons/9/9f/Vimlogo.svg">http://some.svg</EuiButton> | ||
</EuiFlexItem> | ||
<EuiFlexItem grow={false}> | ||
<EuiButton iconType={reactSvg}>{`{reactSvg}`}</EuiButton> |
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.
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.
Sorry, forgot to mention yesterday that @chandlerprall is working on this part.
Feedback addressed. Since this merges to a feature branch, we should be safe merging so @chandlerprall can address the prop typing issues separately. |
Merging. Last to do for the feature branch is fix the console noise and the ie11 issues. |
…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
WIP. Still needs:
For a later PR i'd like to
EuiToken
into its own page@cchaos / @chandlerprall might want to check if we're ok with the lack of animation with non EUI icons. It's prolly OK? Also, @cchaos / @ryankeairns do you think we should copy the component or string for each icon? I couldn't decide which was more useful, which is why I've only applied it to one example in here.
Checklist
This was checked in mobileThis was checked in dark modeA changelog entry exists and is marked appropriatelyThis was checked for breaking changes and labeled appropriatelyJest tests were updated or added to match the most common scenariosThis was checked against keyboard-only and screenreader scenariosThis required updates to Framer X components