Socket
Socket
Sign inDemoInstall

@anchor-protocol/token-icons

Package Overview
Dependencies
82
Maintainers
5
Versions
21
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @anchor-protocol/token-icons

These icons are compatible with material-ui's icon.


Version published
Weekly downloads
0
Maintainers
5
Created
Weekly downloads
 

Readme

Source

Anchor Icon Library

These icons are compatible with material-ui's icon.

import { IconButton } from '@material-ui/core';
import { TokenIcon } from '@anchor-protocol/icons';

function App() {
  return <TokenIcon token="ust" />;
}

Storybook

https://anchor-storybook.vercel.app/?path=/story/assets-token-icons--token-icons

API

index.tsx

export function TokenIconBase({
  token,
  variant = 'svg',
  ...imgProps
}: IconProps) {}

export const tokens = ['ust', 'krt', 'aust', 'akrt', 'luna', 'bluna'] as const;

export const variants = ['svg', '@2x', '@3x', '@4x'] as const;

export type Tokens = typeof tokens[number];

export type IconVariant = typeof variants[number];

export interface IconProps
  extends Omit<
    DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>,
    'src'
  > {
  token: Tokens;
  variant?: IconVariant;
}

export const TokenIcon = styled(TokenIconBase)`
  width: 1em;
  height: 1em;
`;

export const GifIcon = styled.img`
  width: 1em;
  height: 1em;
`;

FAQs

Last updated on 15 Jul 2021

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc