1.19.4 • Published 2 years ago

motorsport-ui-kit v1.19.4

Weekly downloads
-
License
UNLICENSED
Repository
gitlab
Last release
2 years ago

Motorsport UI-Kit

Rus

Публичный UI Kit компании Motorsport Network.

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

Для установки в проект необходимо:

npm i motorsport-ui-kit

Также, необходимо подключить стили библиотеки в любом удобном месте, к примеру в глобальных стилях проекта:

import "motorsport-ui-kit/dist/motorsport-ui-kit.cjs.development.css"

В случае использования компонента LilCards или GallerySlider содержащего слайдер необходимо, также подключить стили библиотеки react-image-gallery:

import "react-image-gallery/styles/scss/image-gallery.scss";

Используемый стек технологий:

  • React
  • Typescript
  • Next JS
  • CSS Modules + SCSS
  • Jest

Список доступных компонентов:

Breadcrumbs, Button, Checkbox, Chips, FileUploader, Input, SelectionControls, Select, Search, Modal, Overlay, LilCards, TextArea, SplitTwoColumns, GallerySlider, Accordion, SnackBar,

Examples with requires props (примеры базового использования, только обязательные props):

  • Breadcrumbs:
<Breadcrumbs
  pathList={[
    {
      href: 'https://google.com',
      name: 'Google home'
    },
    {
      href: 'https://docs.google.com/document/u/0/',
      name: 'Google docs'
    },
    {
      href: 'https://workspace.google.com/products/docs/',
      name: 'Workspace'
    }
  ]}
 />
  • Button:
<Button
    onClick={function that will be executed by clicking}
>
  Default button
</Button>
  • Checkbox:
<Checkbox
  checkboxName="FirstCheckbox"
  label="Remember Me"
  onChange={something function that is ready to accept the returned result onChange act}
/>
  • Chips:
<ChipGroup
  changeFunc={something function that is ready to accept the returned result onChange act}
  chipsData={[
    {
      chipName: 'Buy a Car',
      id: 0
    },
    {
      chipName: 'Sell a Car',
      id: 1
    },
    {
      chipName: 'Donate a Car',
      id: 2
    }
  ]}
/>
  • FileUploader:
<FileUploader
    uploaderName="uploader_name"
    onUploadFile={something function that is ready to accept the returned result onUpload file act} />
  • Input:
<Input
  inputName="input_name"
  onChange={something function that is ready to accept the returned result onChange act}
/>
  • SelectionControls:
<SelectionControls
    name="radio_input"
    onChange={something function that is ready to accept the returned result onChange act}
/>
  • Select:
<Select
    options={[
        {value: "ferrary", label: "Ferrary" },
        { value: "ford", label: "Ford" },
        { value: "bmw", label: "BMW" },
        ]}
    title=""
    iconAfter={something icon for render on the right in select}
    getSelected={something function that is ready to accept the returned result onChange act}
    name="select_name"
/>
  • Search:
<Search searchName="search_name"
    onChange=(value, name, category) => (func which launch by change input's value)
    onEnterDown=(value, name, category) => (func which launch by keydown's Enter)
   />
  • Modal:
<Modal
        isShow
        hideFunc={func which change status for isShowProp}
        modalContent={
          <>
            <h2>Title</h2>
            <h4>Text text text...</h4>
          </>
        }
      />
  • Overlay:
<Overlay isShow type="dark_black" onClick={func which launch by click's event} />
  • LilCards:
<LilCards
          columns={2}
          rows="all"
          cardItems={carts}
          uploadBtn
          uploadBtnProps={{
            uploadFunc: () => func which upload fresh data for new cards render),
            uploadName: "Load More and More",
          }}
        />
  • TextArea:
<TextArea
  textAreaName="text_area_name"
  onChange={something function that is ready to accept the returned result onChange act}
/>
  • SplitTwoColumns:
<SplitTwoColumns>
    <section>Lorem 20 ipsum dolor sit, amet consectetur adipisicing elit. Voluptatum nam numquam corrupti
    illo illum nostrum eligendi ipsam placeat quibusdam inventore.</section>
    <section>Lorem 20 ipsum dolor sit, amet consectetur adipisicing elit. Voluptatum nam numquam corrupti
    illo illum nostrum eligendi ipsam placeat quibusdam inventore.</section>
</SplitTwoColumns>
  • GallerySlider:
<GallerySlider sliderImages={[
  {original: 'img_source', thumbnail: 'img_source'},
  {original: 'img_source', thumbnail: 'img_source'} ... etc.]} />
  • Accordion:
<Accordion list={[{
  id: 0,
  title: "Some title",
  content: "Some content,
}, etc.]}/>
  • SnackBar:
<SnackBar hideFunc={() => {}} message="Something was wrong" show />

Eng

The public UI Kit of the Motorsport Network company.

Installation and use

To install it in the project, you must:

npm i motorsport-ui-kit

Also, you need to connect the library styles in any convenient place, for example, in the global styles of the project:

import "motorsport-ui-kit/dust/motorsport-ui-kit.cs.development.css"

In the case of using the LilCards or GallerySlider component containing a slider, it is also necessary to connect the styles of the react-image-gallery library:

import "react-image-gallery/styles/css/image-gallery.css";

Technology stack used:

  • React
  • Typescript
  • Next JS
  • CSS Modules + CSS
  • Just

List of available components:

Breadcrumbs, Button, Checkbox, Chips, FileUploader, Input, SelectionControls, Select, Search, Modal, Overlay, LilCards, TextArea, SplitTwoColumns, GallerySlider, Accordion, SnackBar,

See the usage examples above.

1.19.0

2 years ago

1.19.4

2 years ago

1.19.3

2 years ago

1.19.2

2 years ago

1.19.1

2 years ago

1.18.12

2 years ago

1.18.16

2 years ago

1.18.15

2 years ago

1.18.14

2 years ago

1.18.13

2 years ago

1.18.1

2 years ago

1.18.0

2 years ago

1.18.5

2 years ago

1.18.4

2 years ago

1.18.3

2 years ago

1.18.2

2 years ago

1.18.9

2 years ago

1.18.8

2 years ago

1.18.7

2 years ago

1.18.6

2 years ago

1.17.11

2 years ago

1.17.10

2 years ago

1.17.14

2 years ago

1.17.13

2 years ago

1.17.12

2 years ago

1.15.19

2 years ago

1.15.21

2 years ago

1.15.22

2 years ago

1.15.23

2 years ago

1.15.24

2 years ago

1.15.20

2 years ago

1.15.29

2 years ago

1.15.25

2 years ago

1.15.26

2 years ago

1.15.27

2 years ago

1.16.3

2 years ago

1.16.2

2 years ago

1.16.1

2 years ago

1.16.0

2 years ago

1.16.7

2 years ago

1.16.6

2 years ago

1.16.5

2 years ago

1.16.4

2 years ago

1.17.2

2 years ago

1.17.1

2 years ago

1.17.0

2 years ago

1.17.6

2 years ago

1.17.5

2 years ago

1.17.4

2 years ago

1.17.3

2 years ago

1.17.9

2 years ago

1.17.8

2 years ago

1.17.7

2 years ago

1.18.11

2 years ago

1.18.10

2 years ago

1.15.10

2 years ago

1.15.11

2 years ago

1.15.12

2 years ago

1.15.13

2 years ago

1.15.18

2 years ago

1.15.14

2 years ago

1.15.15

2 years ago

1.15.16

2 years ago

1.15.17

2 years ago

1.15.8

2 years ago

1.15.7

2 years ago

1.15.6

2 years ago

1.15.5

2 years ago

1.15.9

2 years ago

1.12.3

2 years ago

1.12.2

2 years ago

1.12.1

2 years ago

1.12.0

2 years ago

1.12.7

2 years ago

1.12.6

2 years ago

1.12.5

2 years ago

1.12.4

2 years ago

1.12.9

2 years ago

1.12.8

2 years ago

1.13.2

2 years ago

1.13.1

2 years ago

1.13.6

2 years ago

1.13.5

2 years ago

1.13.4

2 years ago

1.13.3

2 years ago

1.13.9

2 years ago

1.13.8

2 years ago

1.13.7

2 years ago

1.14.1

2 years ago

1.14.0

2 years ago

1.14.3

2 years ago

1.15.0

2 years ago

1.15.4

2 years ago

1.15.3

2 years ago

1.15.2

2 years ago

1.15.1

2 years ago

1.12.10

2 years ago

1.13.11

2 years ago

1.13.10

2 years ago

1.13.12

2 years ago

1.11.36

2 years ago

1.11.37

2 years ago

1.11.34

2 years ago

1.11.35

2 years ago

1.11.32

2 years ago

1.11.33

2 years ago

1.10.5

2 years ago

1.10.4

2 years ago

1.10.9

2 years ago

1.10.8

2 years ago

1.10.7

2 years ago

1.10.6

2 years ago

1.11.16

2 years ago

1.11.17

2 years ago

1.11.14

2 years ago

1.11.15

2 years ago

1.11.12

2 years ago

1.11.13

2 years ago

1.11.10

2 years ago

1.11.11

2 years ago

1.11.18

2 years ago

1.11.19

2 years ago

1.11.4

2 years ago

1.11.3

2 years ago

1.11.2

2 years ago

1.11.1

2 years ago

1.11.8

2 years ago

1.11.7

2 years ago

1.11.6

2 years ago

1.11.5

2 years ago

1.11.30

2 years ago

1.11.31

2 years ago

1.11.9

2 years ago

1.11.20

2 years ago

1.11.27

2 years ago

1.11.28

2 years ago

1.11.25

2 years ago

1.11.23

2 years ago

1.11.24

2 years ago

1.11.21

2 years ago

1.11.22

2 years ago

1.11.29

2 years ago

1.11.0

2 years ago

1.10.15

2 years ago

1.10.16

2 years ago

1.10.13

2 years ago

1.10.14

2 years ago

1.10.11

2 years ago

1.10.12

2 years ago

1.10.10

2 years ago

1.10.17

2 years ago

1.10.18

2 years ago

1.10.3

2 years ago

1.10.2

2 years ago

1.9.1

2 years ago

1.9.0

2 years ago

1.10.1

2 years ago

1.10.0

2 years ago

1.9.9

2 years ago

1.9.8

2 years ago

1.9.7

2 years ago

1.9.6

2 years ago

1.9.5

2 years ago

1.9.4

2 years ago

1.9.3

2 years ago

1.9.2

2 years ago

1.8.9

2 years ago

1.8.10

2 years ago

1.8.11

2 years ago

1.8.12

2 years ago

1.8.13

2 years ago

1.8.14

2 years ago

1.8.15

2 years ago

1.8.16

2 years ago

1.8.17

2 years ago

1.8.18

2 years ago

1.7.13

3 years ago

1.7.14

3 years ago

1.7.15

3 years ago

1.7.16

3 years ago

1.7.17

3 years ago

1.7.18

2 years ago

1.8.2

2 years ago

1.8.1

2 years ago

1.8.0

2 years ago

1.8.8

2 years ago

1.8.7

2 years ago

1.8.6

2 years ago

1.8.5

2 years ago

1.8.4

2 years ago

1.8.3

2 years ago

1.7.11

3 years ago

1.7.12

3 years ago

1.6.4

3 years ago

1.6.3

3 years ago

1.6.2

3 years ago

1.6.1

3 years ago

1.6.0

3 years ago

1.7.10

3 years ago

1.7.9

3 years ago

1.7.8

3 years ago

1.7.7

3 years ago

1.7.6

3 years ago

1.7.5

3 years ago

1.7.4

3 years ago

1.6.6

3 years ago

1.6.5

3 years ago

1.7.3

3 years ago

1.7.2

3 years ago

1.7.1

3 years ago

1.7.0

3 years ago

1.5.18

3 years ago

1.5.17

3 years ago

1.5.14

3 years ago

1.5.13

3 years ago

1.5.16

3 years ago

1.5.15

3 years ago

1.5.9

3 years ago

1.5.8

3 years ago

1.5.7

3 years ago

1.5.10

3 years ago

1.5.12

3 years ago

1.5.11

3 years ago

1.5.6

3 years ago

1.5.5

3 years ago

1.5.4

3 years ago

1.5.3

3 years ago

1.5.2

3 years ago

1.5.1

3 years ago

1.5.0

3 years ago

1.4.17

3 years ago

1.4.15

3 years ago

1.4.14

3 years ago

1.4.16

3 years ago

1.4.9

3 years ago

1.4.11

3 years ago

1.4.8

3 years ago

1.4.10

3 years ago

1.4.13

3 years ago

1.4.12

3 years ago

1.4.6

3 years ago

1.4.5

3 years ago

1.4.4

3 years ago

1.4.7

3 years ago

1.4.3

3 years ago

1.4.2

3 years ago

1.4.1

3 years ago

1.4.0

3 years ago

1.3.17

3 years ago

1.3.14

3 years ago

1.3.15

3 years ago

1.3.16

3 years ago

1.3.10

3 years ago

1.3.13

3 years ago

1.3.11

3 years ago

1.3.12

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.2.0

3 years ago

1.2.8

3 years ago

1.1.9

3 years ago

1.2.7

3 years ago

1.1.8

3 years ago

1.2.6

3 years ago

1.1.7

3 years ago

1.2.5

3 years ago

1.1.6

3 years ago

1.2.4

3 years ago

1.1.5

3 years ago

1.2.3

3 years ago

1.1.4

3 years ago

1.2.2

3 years ago

1.3.0

3 years ago

1.2.1

3 years ago

1.1.12

3 years ago

1.1.11

3 years ago

1.1.10

3 years ago

1.1.13

3 years ago

1.2.9

3 years ago

1.2.12

3 years ago

1.2.13

3 years ago

1.2.10

3 years ago

1.2.11

3 years ago

1.2.14

3 years ago

1.2.15

3 years ago

1.1.0

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.0.10

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago