Socket
Socket
Sign inDemoInstall

gantri-components

Package Overview
Dependencies
21
Maintainers
0
Versions
1027
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

gantri-components

## Adding new icons


Version published
Weekly downloads
2.2K
increased by102.06%
Maintainers
0
Created
Weekly downloads
 

Readme

Source

ui-library

Adding new icons

  1. From Figma, right click on icon from sidebar (Make sure you have the right element selected. They should be 16x16 or 24x24) and click Copy/Paste as > Copy as SVG.
  2. Create a new .svg file in the /src/assets/icons/__APPROPRIATE_CATEGORY_FOLDER__/ directory with the same name as what appears in Figma minus ic_ and _16 (example: ic_corner_16 and ic_corner_24 become corner and corner_24).
  3. Look at each new svg file and verify that the viewbox is viewbox="0 0 16 16" or viewbox="0 0 24 24", as applicable. Update any that are not the appropriate value. If the icons do not look correct when complete, you can try reverting the change or talk to the designers about correcting them.
  4. Update fill attributes to reference value "currentColor". stroke attributes should also be updated. Be careful to check that the updated icon matches the original icon. Send the icon back to the designers to correct if there are any issues.
  5. Remove IDs and masks. Be careful to check that the updated icon matches the original icon. Send the icon back to the designers to correct if there are any issues.
  6. Run yarn run generate-icons
  7. Check for references to .ds_store and delete them, if present.

Deploying beta code changes

If you'd like to deploy some code that can be pulled into another repo, you can merge your changes into the beta branch. After deployment (you can verify deployment status here), you can install the beta code to your repo using yarn add gantri-components@beta. Just be sure not to reinstall the normal version when you're done.

NOTE: chore commit prefixes do not trigger a new version deployment. For a list of commit prefixes and their deployment versions, please see this document.

Testing

Testing is done using Jest for base JavaScript functionality and Jest with React Testing Library for React functionality.

You can run all tests locally by running yarn test in the command line. By default, this script is run with the --watch option which will watch for saved changes and automatically re-run related tests. You can add other options to the command by adding running yarn test {{option flag}} (example: yarn test --verbose).

All tests are run on GitHub each time new code is pushed to your PR.

FAQs

Last updated on 15 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc