![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@kupibilet/icons
Advanced tools
[![NPM version][npm-img]][npm-url]
[
][daviddm-dev-url]
https://github.com/kupibiletdev/icons
yarn run build
open dist/index.html
Часто бывает что после оптимизации svg после дизайнеров они ломаются из-за того что были сделаны неустойчиво
fill-rule="evenodd"
ломает оптимизацию/src/icons
. Название иконки должно быть с приставкой kb_
.yarn build
, после чего убедиться, что в собранном спрайте (dist/sprite.js
) появилась новая иконка и она не пустая.npm version patch
(эту команду выполняет maintainer репозитория).npm i @kupibilet/icons --save-dev
/.storybook/head.html
подключить иконки с cdn: <script src="https://unpkg.com/@kupibilet/icons"></script>
stories.js
, после {story()}
: <div
dangerouslySetInnerHTML={{ __html: window.sprite.default() }}
style={{
display: 'none',
}}
/>
coming soon
В зависимости от иконки, у неё может быть два цвета.
Один определяется свойством fill
, другой stroke
.
Цвета в иконку передаются из стилей родительского компонента (для того, чтобы их удобно было менять вместе с цветом текста на кнопке, например):
fill: white
stroke: black
Также, через prop styleName
можно передать класс с нужными свойствами.
Доступные классы, на данный момент:
[daviddm-dev-url]: https://david-dm.org/kupibiletdev/icons#info=devDependencies) [npm-img]: https://badge.fury.io/js/icons.svg [npm-url]: https://www.npmjs.com/package/icons
FAQs
icons for kupibilet.ru
The npm package @kupibilet/icons receives a total of 10 weekly downloads. As such, @kupibilet/icons popularity was classified as not popular.
We found that @kupibilet/icons demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 open source maintainers collaborating on the project.
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.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.