Skip to content

feat: chevron-expand and chevron-collapse icons #1198

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 5 commits into from
Mar 22, 2023

Conversation

sean-perkins
Copy link
Contributor

@sean-perkins sean-perkins commented Mar 22, 2023

What changed

Adds two new icons to ionicons: chevron-expand and chevron-collapse.

The SVG optimization implementation that we built around svgo had issues if you pre-optimized the SVG. I updated the implementation so that we can provide SVGs that already have the fill or stroke set to currentColor, which was required to get the new icons to be compatible with the color property of ion-icon.

Testing

  • Clone the branch
  • Install dependencies (npm ci)
  • Build the project (npm run build)
  • Serve the project (npm run start)

You can update the src/index.html template to test that colors work correctly with the new icons (and display variants):

<ion-icon color="warning" name="chevron-expand"></ion-icon>
<ion-icon color="warning" name="chevron-collapse"></ion-icon>
<ion-icon color="warning" name="chevron-expand-sharp"></ion-icon>
<ion-icon color="warning" name="chevron-collapse-sharp"></ion-icon>
<ion-icon color="warning" name="chevron-expand-outline"></ion-icon>
<ion-icon color="warning" name="chevron-collapse-outline"></ion-icon>

You can also view the cheatsheet at the bottom of the index template to see the raw rendering of the SVG.

Other information

Dev-build: 7.0.1-dev.11679510424.1ffdf3ba

@sean-perkins sean-perkins marked this pull request as ready for review March 22, 2023 18:38
@sean-perkins sean-perkins requested a review from a team March 22, 2023 18:38
Copy link
Contributor

@liamdebeasi liamdebeasi left a comment

Choose a reason for hiding this comment

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

Great job!

@sean-perkins sean-perkins merged commit cdb0d80 into feature-7.1 Mar 22, 2023
@sean-perkins sean-perkins deleted the feat/chevron-icons branch March 22, 2023 20:13
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.

2 participants