New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@axa-ch/icon

Package Overview
Dependencies
Maintainers
22
Versions
102
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@axa-ch/icon

The AXA Icon component

  • 1.2.1-alpha.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
134
increased by54.02%
Maintainers
22
Weekly downloads
 
Created
Source

AXA Icon

<axa-icon> renders an icon, given either an icon name or a resource path to a suitable SVG image.

Usage

npm install @axa-ch/icon

import '@axa-ch/icon';

...
<axa-icon icon="arrow-right"></axa-icon>

// resource path
<axa-icon icon="/img/name.svg"></axa-icon>

React

You can use this component directly in your JSX without further React-ification (see Usage above).

Pure HTML pages

Import the icon-defining script and use icons like so:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Your awesome title</title>
  </head>
  <body>
    <axa-icon icon="arrow-right"></axa-icon>
    <script src="node_modules/@axa-ch/icon/dist/index.js"></script>
  </body>
</html>

Properties

Icon

Icon names
Attribute
icon="arrow-right"
icon="collapse"
icon="document"
icon="download"
icon="email"
icon="expand"
icon="mobile"
icon="phone"
icon="plus"
icon="search"
icon="upload"
Icon resource path

The icon resource path must have .svg extension.

Using custom icons

Typical icon SVG looks similar to

<svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="10px" height="12px" viewBox="0 0 10 12">
  <path fill="currentColor" d="M9.7,4.3H7v-4H3v4H0.3L5,9L9.7,4.3z"/>
  <path fill="currentColor" d="M0.3,10.3v1.3h9.3v-1.3H0.3z"/>
</svg>

When using a custom icon, make sure to define the icon width and height (in px) in its definition and use fill="currentColor" on paths that should inherit the color from its containing component, ie <AXALinkReact variant="icon" icon={importedIcon}>Link</AXALinkReact>.

FAQs

Package last updated on 28 May 2019

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc