Skip to content
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

Switch layer-icon to pure SVGs #25448

Merged
merged 2 commits into from
Jul 3, 2020

Conversation

morgan-sam
Copy link
Contributor

@morgan-sam morgan-sam commented Jul 1, 2020

Description

Converted layer-icon.js inline SVGs to SVG files

Related Issues

Fixes #25346

@morgan-sam morgan-sam requested a review from a team as a code owner July 1, 2020 17:40
@gatsbot gatsbot bot added the status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer label Jul 1, 2020
Comment on lines 11 to 15
AbstractSymbol: <AbstractSymbol stroke={fillColor} />,
AtomicSymbol: <AtomicSymbol stroke={fillColor} />,
GraphqlLogo: <GraphqlLogo fill={fillColor} stroke={fillColor} />,
ReactLogo: <ReactLogo fill={fillColor} />,
AppWindow: <AppWindow stroke={fillColor} />,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of passing these fills/stroke props down, you can instead use currentColor.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the props and added currentColor references in the SVGs.

@LekoArts LekoArts added topic: website and removed status: triage needed Issue or pull request that need to be triaged and assigned to a reviewer labels Jul 2, 2020
@tesseralis tesseralis self-assigned this Jul 2, 2020
Copy link
Contributor

@tesseralis tesseralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't properly add the color to the icons (the "Content" section should be orange):

Screenshot of ComponentModel with gray icon color

You need to change LayerModel to specify the color:

        <span sx={{ height: 40, color: selected ? colors[baseColor][70] : colors.grey[50] }}>
          <LayerIcon name={icon} />
        </span>

Copy link
Contributor

@tesseralis tesseralis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@tesseralis tesseralis merged commit d0b6a83 into gatsbyjs:master Jul 3, 2020
@gatsbot
Copy link

gatsbot bot commented Jul 3, 2020

Holy buckets, @morgan-sam — we just merged your PR to Gatsby! 💪💜

Gatsby is built by awesome people like you. Let us say “thanks” in two ways:

  1. We’d like to send you some Gatsby swag. As a token of our appreciation, you can go to the Gatsby Swag Store and log in with your GitHub account to get a coupon code good for one free piece of swag. We’ve got Gatsby t-shirts, stickers, hats, scrunchies, and much more. (You can also unlock even more free swag with 5 contributions — wink wink nudge nudge.) See gatsby.dev/swag for details.
  2. We just invited you to join the Gatsby organization on GitHub. This will add you to our team of maintainers. Accept the invite by visiting https://github.com/orgs/gatsbyjs/invitation. By joining the team, you’ll be able to label issues, review pull requests, and merge approved pull requests.

If there’s anything we can do to help, please don’t hesitate to reach out to us: tweet at @gatsbyjs and we’ll come a-runnin’.

Thanks again!

@morgan-sam morgan-sam deleted the layer-icon-pure-svgs branch July 3, 2020 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

maintenance(www): Switch layer-icon to pure SVGs
3 participants