Update dependency @primer/octicons-react to v11 - autoclosed
Created by: renovate[bot]
This PR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
@primer/octicons-react | ^9.6.0 -> ^11.1.0 |
Release Notes
primer/octicons
v11.1.0
🚀 New Features
🐛 Fixes
- Corrected stroke for 24px
smiley
(#509)
v11.0.0
💅 Enhancements
- Cache retrieval of Octicon SVG paths (#491)
💥 Breaking changes
- Fix 24px icon names #465 (@BenJetson
🙇 )-
unverifed-24.svg
→unverified-24.svg
-
file-symlink-24.svg
→file-symlink-file-24.svg
-
fire-24.svg
→flame-24.svg
-
eye-slash-24.svg
→eye-closed-24.svg
-
- Remove 24px
settings
icon. Usegear
instead #493
v10.1.0
🚀 New Features
🐛 Fixes
- Corrected positioning for
triangle-down
#459
🧽Chores
- Dependency updates
v10.0.0
All packages
- We've given Octicons a new look
✨ Some icons have new names and some icons haven't been redesigned yet. The following table documents those changes. If you're using an octicon in v9.x that doesn't have an equivelent in v10.0 yet, let us know by opening an issue.
v9.x | v10.0 | Notes |
---|---|---|
arrow-small-down |
arrow-down |
|
arrow-small-left |
arrow-left |
|
arrow-small-right |
arrow-right |
|
arrow-small-up |
arrow-up |
|
browser |
Request this icon | |
bug |
Request this icon | |
circuit-board |
cpu |
|
cloud-download |
download |
|
cloud-upload |
upload |
|
dashboard |
meter |
|
dependent |
package-dependents |
|
device-camera |
Request this icon | |
file-pdf |
file |
|
file-symlink-directory |
file-submodule |
|
gist-secret |
lock |
|
gist |
code-square |
|
github-action |
Request this icon | |
heart-outline |
heart |
|
internal-repo |
repo |
|
jersey |
people |
|
keyboard |
Request this icon | |
line-arrow-down |
arrow-down |
|
line-arrow-left |
arrow-left |
|
line-arrow-right |
arrow-right |
|
line-arrow-up |
arrow-up |
|
mail-read |
mail |
|
no-newline |
no-entry |
|
paintcan |
paintbrush |
|
plus-small |
plus |
|
primitive-dot-stroke |
dot |
|
primitive-dot |
dot-fill |
|
primitive-square |
square-fill |
|
radio-tower |
broadcast |
|
repo-clone |
Request this icon | |
repo-force-push |
repo-push |
|
repo-pull |
Request this icon | |
repo-template-private |
Request this icon | |
request-changes |
diff |
|
saved |
bookmark |
|
text-size |
heading or typography
|
|
unsaved |
bookmark-slash |
|
watch |
hourglass |
|
workflow-all |
Request this icon |
- We designed a set of 24px icons—as well as 16px icons—to accommodate interfaces that need larger icons. All package implementations now choose which SVG to render based on the size passed in.
@primer/octicons-react)
React (-
Icon components (e.g.
AlertIcon
,ArrowRightIcon
, etc.) now acceptsize
,ariaLabel
,verticalAlign
, andclassName
props and can be used on their own. No need to pass them to theOcticon
component.<AlertIcon size={24} />
-
Icon components will now choose the best SVG icon to render based on the
size
passed in. -
The
Octicon
component is deprecated. Use icon components on their own instead:- <Octicon icon={AlertIcon} /> + <AlertIcon />
💥
BREAKING CHANGES -
All icon component names now include
Icon
at the end (e.g.Alert
→AlertIcon
). -
In order to enable tree-shaking, we removed the
iconsByName
andgetIconByName
exports. -
Octicon
no longer acceptswidth
orheight
props. Use thesize
prop instead. In cases where the width and height of an icon are not equal (e.g. logos), the height will be set to the value of thesize
prop and thewidth
will be scaled proportionally. -
We renamed the
ariaLabel
prop toaria-label
to be consistent with React: https://reactjs.org/docs/accessibility.html#wai-aria- <AlertIcon ariaLabel="alert"> + <AlertIcon aria-label="alert">
-
Setting
verticalAlign="top"
on theOcticon
component or any icon component will now apply avertical-align: top;
style to the<svg>
. Previously, we were translating "top" to "text-top." So settingverticalAlign="top"
would apply avertical-align: text-top;
style to the<svg>
. If you want a vertical alignment of "text-top," set theverticalAlign
prop to"text-top"
. -
Custom icon components passed to the
Octicon
component now need to render the entire<svg>
, not just the<path>
.
function CirclesIcon() {
return (
- <React.Fragment>
+ <svg viewBox="0 0 30 10" width="30" height="10">
<circle r={5} cx={5} cy={5}/>
<circle r={5} cx={15} cy={5}/>
<circle r={5} cx={25} cy={5}/>
- </React.Fragment>
+ </svg>
)
}
- CirclesIcon.size = [30, 10]
@primer/octicons)
JavaScript (
💥
BREAKING CHANGES - The structure of each icon object has been updated to allow support multiple SVGs per icon:
Before
octicons.alert
// {
// symbol: 'alert',
// keywords: ['warning', 'triangle', 'exclamation', 'point'],
// toSVG: [Function],
// width: 16,
// height: 16,
// path: '<path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/>',
// options: {
// version: '1.1',
// width: '16',
// height: '16',
// viewBox: '0 0 16 16',
// class: 'octicon octicon-alert',
// 'aria-hidden': 'true'
// },
// }
After
octicons.alert
// {
// symbol: 'alert',
// keywords: ['warning', 'triangle', 'exclamation', 'point'],
// toSVG: [Function]
// heights: {
// 16: {
// width: 16,
// path: '<path d="M8.865 1.52c-.18-.31-.51-.5-.87-.5s-.69.19-.87.5L.275 13.5c-.18.31-.18.69 0 1 .19.31.52.5.87.5h13.7c.36 0 .69-.19.86-.5.17-.31.18-.69.01-1L8.865 1.52zM8.995 13h-2v-2h2v2zm0-3h-2V6h2v4z"/>',
// options: {
// version: '1.1',
// width: '16',
// height: '16',
// viewBox: '0 0 16 16',
// class: 'octicon octicon-alert',
// 'aria-hidden': 'true'
// },
// },
// 24: ...
// }
// }
Renovate configuration
-
If you want to rebase/retry this PR, check this box
This PR has been generated by WhiteSource Renovate. View repository job log here.