Socket
Socket
Sign inDemoInstall

@sberdevices/plasma-b2c

Package Overview
Dependencies
112
Maintainers
3
Versions
866
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @sberdevices/plasma-b2c

SberDevices Design System / React UI kit for business-related web applications


Version published
Maintainers
3
Created

Readme

Source

Библиотека компонентов Plasma B2C

Реализация компонентов для создания веб-приложений.

plasma-ui

Использование

Компоненты реализованы на typescript с помощью react и styled-components;

Использование данного пакета предполагает использование react & react-dom; Использование styled-components на проект не обязательно, также как и использование typescript. Но для того чтобы комопненты работали styled-components необходимо установить.

Установка пакета

$ npm install --save react react-dom
$ npm install --save styled-components
$ npm install --save @sberdevices/plasma-b2c @sberdevices/plasma-icons @sberdevices/plasma-tokens-b2c @sberdevices/plasma-typo

Тема и типографика

Для корректной работы необходимо создать глобальные стили:

// Main.tsx
import React from 'react';
import { createGlobalStyle } from 'styled-components';

import { dark } from '@sberdevices/plasma-tokens-b2c/themes';
import { standard as standardTypo, compatible as compatibleTypo } from '@sberdevices/plasma-typo';

import { App } from './App.tsx';

const TypoStyle = createGlobalStyle(standardTypo);
const CompatibleTypoStyle = createGlobalStyle(compatibleTypo);

const Theme = createGlobalStyle(dark);

export const Main = () => {
    const Theme = themes[context.globals.theme];

    return (
        <>
            <TypoStyle />
            <CompatibleTypoStyle />
            <Theme />

            <App />
        </>
    );
};

Использование компонентов

// App.tsx
import { Button } from '@sberdevices/plasma-b2c';

export const App = () => {
    return <Button text="Hello, Plasma!" />;
};

Keywords

FAQs

Last updated on 12 Apr 2022

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