@yandex/ui-icons
TypeScript icon, indicating that this package has built-in type declarations

0.0.1-alpha.1 • Public • Published

@yandex/ui-icons (WIP)

image

npm

Installation

npm i -PE @yandex/ui-icons

Usage (jsx)

Simple

import { Search } from '@yandex/ui-icons'

export const App = () => {
  return <Search />
}

Set size

Now available next sizes: 12, 16, 24, 32 (default 24).

import { Search } from '@yandex/ui-icons'

export const App = () => {
  return <Search size={12} />
}

Get ref

import { useRef } from 'react'
import { Search } from '@yandex/ui-icons'

export const App = () => {
  const iconRef = useRef<SVGSVGElement(null)

  return <Search ref={iconRef} />
}

Set className

By default all icons has base className: SvgIcon.

import { Search } from '@yandex/ui-icons'

export const App = () => {
  return <Search className="MyIcon" />
}

Change color

At now color can be changed with context placement: currentColor.

import { Search } from '@yandex/ui-icons'

export const App = () => {
  return (
    <div style={{ color: 'red' }}>
      <Search />
    </div>
  )
}

Usage (svg)

All icons also available as svg files and can be used inside css or any svg-loaders.

.Icon {
  width: 24px;
  height: 24px;
  background-size: 100%;
  background-image: url("@yandex/ui-icons/Search.svg");
}

License

This project develop under MPL-2.0 license.

Readme

Keywords

none

Package Sidebar

Install

npm i @yandex/ui-icons

Weekly Downloads

168

Version

0.0.1-alpha.1

License

MPL-2.0

Unpacked Size

977 kB

Total Files

1243

Last publish

Collaborators

  • veged
  • tadatuta
  • nnigmat
  • alexstrnik
  • yandex-bot
  • yandex-metrica-watch
  • yarastqt
  • axaxaman