-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Update to use polaris-icons v2 #982
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,54 @@ | ||
import POLARIS_ICONS from '@shopify/polaris-icons'; | ||
|
||
export const add = POLARIS_ICONS.add; | ||
export const alert = POLARIS_ICONS.alert; | ||
export const arrowDown = POLARIS_ICONS.arrowDown; | ||
export const arrowLeft = POLARIS_ICONS.arrowLeft; | ||
export const arrowRight = POLARIS_ICONS.arrowRight; | ||
export const arrowUp = POLARIS_ICONS.arrowUp; | ||
export const arrowUpDown = POLARIS_ICONS.arrowUpDown; | ||
export const calendar = POLARIS_ICONS.calendar; | ||
export const cancel = POLARIS_ICONS.cancel; | ||
export const cancelSmall = POLARIS_ICONS.cancelSmall; | ||
export const caretDown = POLARIS_ICONS.caretDown; | ||
export const caretUp = POLARIS_ICONS.caretUp; | ||
export const checkmark = POLARIS_ICONS.checkmark; | ||
export const chevronDown = POLARIS_ICONS.chevronDown; | ||
export const chevronLeft = POLARIS_ICONS.chevronLeft; | ||
export const chevronRight = POLARIS_ICONS.chevronRight; | ||
export const chevronUp = POLARIS_ICONS.chevronUp; | ||
export const circleCancel = POLARIS_ICONS.circleCancel; | ||
export const circleChevronDown = POLARIS_ICONS.circleChevronDown; | ||
export const circleChevronLeft = POLARIS_ICONS.circleChevronLeft; | ||
export const circleChevronRight = POLARIS_ICONS.circleChevronRight; | ||
export const circleChevronUp = POLARIS_ICONS.circleChevronUp; | ||
export const circleInformation = POLARIS_ICONS.circleInformation; | ||
export const circlePlus = POLARIS_ICONS.circlePlus; | ||
export const circlePlusOutline = POLARIS_ICONS.circlePlusOutline; | ||
export const conversation = POLARIS_ICONS.conversation; | ||
export const deleteIcon = POLARIS_ICONS.deleteIcon; | ||
export const disable = POLARIS_ICONS.disable; | ||
export const dispute = POLARIS_ICONS.dispute; | ||
export const duplicate = POLARIS_ICONS.duplicate; | ||
export const embed = POLARIS_ICONS.embed; | ||
export const exportIcon = POLARIS_ICONS.exportIcon; | ||
export const external = POLARIS_ICONS.external; | ||
export const help = POLARIS_ICONS.help; | ||
export const home = POLARIS_ICONS.home; | ||
export const horizontalDots = POLARIS_ICONS.horizontalDots; | ||
export const importIcon = POLARIS_ICONS.importIcon; | ||
export const logOut = POLARIS_ICONS.logOut; | ||
export const menu = POLARIS_ICONS.menu; | ||
export const notes = POLARIS_ICONS.notes; | ||
export const notification = POLARIS_ICONS.notification; | ||
export const onlineStore = POLARIS_ICONS.onlineStore; | ||
export const orders = POLARIS_ICONS.orders; | ||
export const print = POLARIS_ICONS.print; | ||
export const products = POLARIS_ICONS.products; | ||
export const profile = POLARIS_ICONS.profile; | ||
export const subtract = POLARIS_ICONS.subtract; | ||
export const refresh = POLARIS_ICONS.refresh; | ||
export const risk = POLARIS_ICONS.risk; | ||
export const save = POLARIS_ICONS.save; | ||
export const search = POLARIS_ICONS.search; | ||
export const view = POLARIS_ICONS.view; | ||
export { | ||
addMinor, | ||
alertMinor, | ||
arrowDownMinor, | ||
arrowLeftMinor, | ||
arrowRightMinor, | ||
arrowUpMinor, | ||
arrowUpDownMinor, | ||
calendarMinor, | ||
cancelMajor, | ||
cancelSmallMinor, | ||
caretDownMinor, | ||
caretUpMinor, | ||
checkmarkMinor, | ||
chevronDownMinor, | ||
chevronLeftMinor, | ||
chevronRightMinor, | ||
chevronUpMinor, | ||
circleCancelMinor, | ||
circleChevronDownMinor, | ||
circleChevronLeftMinor, | ||
circleChevronRightMinor, | ||
circleChevronUpMinor, | ||
circleInformationMajor, | ||
circlePlusMinor, | ||
circlePlusOutlineMinor, | ||
conversationMinor, | ||
deleteMinor, | ||
disableMinor, | ||
disputeMinor, | ||
duplicateMinor, | ||
embedMinor, | ||
exportMinor, | ||
externalMinor, | ||
helpMajor, | ||
homeMajor, | ||
horizontalDotsMinor, | ||
importMinor, | ||
logOutMinor, | ||
menuMajor, | ||
notesMinor, | ||
notificationMajor, | ||
onlineStoreMajor, | ||
ordersMajor, | ||
printMinor, | ||
productsMajor, | ||
profileMinor, | ||
subtractMinor, | ||
refreshMinor, | ||
riskMinor, | ||
saveMinor, | ||
searchMinor, | ||
viewMinor, | ||
} from '@shopify/polaris-icons'; |
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
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.
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.
This whole file could all be replaced with just
export * from '@shopify/polaris-icons'
but IIRC @amrocha and I decided that it's best to be explicit.I'm still kinda tempted to 🔥 this file entirely and just import icons direct within the Icon component but we can decide if we want to do that later
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.
Like we discussed, I believe having an index file creates good habits. Prune a list of icons down to the ones you need and use them, instead of potentially adding a new icon every time
On the
export *
side though, I talked to Kaelig and it sounds like there's only a few icons that are problematic, so I'm gonna put something together soon, run it by Jesse and see if we can get it merged. If we do then what I said above doesn't apply anymore and we can get rid of this file