0.0.13 • Published 2 years ago

rncb-component-lib v0.0.13

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

rncb-component-lib

How to use

Install

// npm install
npm install rncb-component-lib

AppHeader

import into a single component.

import { AppHeader } from 'rncb-component-lib';
<template>
  <div>
    <app-header/>
  </div>
</template>
<script>
export default {
    components: {AppHeader}
}
</script>

alt text

Options

  • isBasketEmpty
    • условие для навешивания класса 'header__basket_not-empty'
    • default: true
  • logoCallback
    • для роутинга, передавать $router.push
    • default: () => '/'
  • basketCallback
    • для роутинга, передавать $router.push
    • default: () => '/cart'

AppFooter

import into a single component.

import { AppFooter } from 'rncb-component-lib';
<template>
  <div>
    <app-footer/>
  </div>
</template>
<script>
export default {
    components: {AppFooter}
}
</script>

alt text alt text alt text

Options

  • address
    • адрес
    • default: '\295000, г. Симферополь,\\ул. Набережная им. 60-летия СССР, д. 34\'
  • downloadAppHref
    • ссылка на скачивание
    • default: '#'
  • vkHref
    • ссылка на ресурс
    • default: '#'
  • youtubeHref
    • ссылка на ресурс
    • default: '#'
  • twitterHref
    • ссылка на ресурс
    • default: '#'
  • okHref
    • ссылка на ресурс
    • default: '#'

BreadcrumbLink

  1. import as global component.
// import BreadcrumbLink
import { BreadcrumbLink } from 'rncb-component-lib';
Vue.component('BreadcrumbLink', BreadcrumbLink);
new Vue({
	// ...
})
  1. import into a single component.
// import BreadcrumbLink
import { BreadcrumbLink } from 'rncb-component-lib';
<template>
  <div>
    <breadcrumb-link 
      text="Каталог" 
      @breadcrumbCallback="$router.push"
    />
  </div>
</template>
<script>
export default {
    // declare BreadcrumbLink
    components: {BreadcrumbLink}
}
</script>

alt text

Options

  • text
    • текст ссылки
    • default: 'Назад'

MainButton

import into a single component.

import { MainButton } from 'rncb-component-lib';
<template>
  <div>
    <main-button :text="btnText"/>
  </div>
</template>
<script>
export default {
    components: {MainButton},
    data(): {
      return {
        btnText: 'Сохранить'
      }
    }
}
</script>

alt text

Options

  • text
    • текст на кнопке
    • default: 'Отправить'
  • type
    • тип кнопки
    • default: 'submit'

FiltersItem

import into a single component.

import { FiltersItem } from 'rncb-component-lib';
<template>
  <div>
    <filters-item
        isBordered
        filterName="Металл"
        inputName="material"
        :filters="materialFilters"
        :checkedFilterItems="checkedFilterItems"
        @onChange="() => {}"
        :isDisabled="false"
    />
  </div>
</template>
<script>
export default {
    components: {FiltersItem},
    data() {
    return {
      materialFilters: [
        {
          id: 1,
          priority: 0,
          title: 'Золото'
        },
        {
          id: 2,
          priority: 0,
          title: 'Медно-никелевый сплав'
        },
        {
          id: 3,
          priority: 0,
          title: 'Серебро'
        }
      ],
      checkedFilterItems: [1,3]
    }
  }
}
</script>

alt text

Options

  • isBordered
    • наличие границы
    • default: true
  • filterName
    • название фильтра
    • default: 'Валюта'
  • inputName
    • атрибут name у input
    • default: 'currency'
  • filters
    • массив элементов в фильтре
    • default: []
  • isDisabled
    • неактивный фильтр
    • default: афдыу
  • checkedFilterItems
    • список выбранных фильтров
    • default: []
0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago