0.5.29 • Published 5 years ago

simsalabim-design v0.5.29

Weekly downloads
253
License
-
Repository
-
Last release
5 years ago

simsalabim-design 🧙‍♂️

Simsalabim is Bingo Bango's UI library of Vue components.

Just install it like this yarn add simsalabim-design and then import the components like this import { component } from 'simsalabim-design'. Or you can go ahead and globally register them all by importing like this import components from 'simsalabim-design' and then iterating over components and calling Vue.component for each. Cool!

Components

Card

It's a super basic card. Bit of border radius and a white background and some padding. No props, nothing.

BingoButton

Simple button with two color modes: red and white. Pass onClick prop. Pass color prop as string.

BottomNav

Wew, this one's a tad more complicated.

BottomNav receives a RouteList, an array-like type that consists of multiple BingoRoutes, each with an optional BingoMeta attribute.

Each route can have a meta attribute called topLevel. If this is true, the route will appear in the Bottom Nav. If this is true, you will also need to set an friendlyEmoji (literally just an emoji), as well as a friendlyName. You can also set a vue-i18n translationKey.

In order to use this component best, import the RouteList type in your router.ts file and export routes as a variable that you then pass to new Router. This way, you can import { routes } in the view or component where you want to add this BottomNav.

Then, simply add BottomNav where you want it, and pass two required props: routes (RouteList) and currentRouteName (this.$route.name). In order to make it actually do something, listen to @navigate and then — presumably — navigate to that route. Your handler for this event will receive a BingoRoute which means you can do $router.push(route.path), for example. If you want to use translation keys, you need to pass your project's i18n instance like this: :i18n="this._i18n".

Oh — if you just wanna see how it looks, slap test on it and it'll display some imaginary routes and you can click around.

Bingo Bango 🧙‍♂️

ThemeProvider

ThemeProvier provides themes. It does so in the form of CSS variables. There's two themes available: 'dark' or 'light'. Select your theme by passing the theme prop with a string that reads the theme you want. The component will then simply attach theme values as variables onto itself. Wrap your app in the theme provider and you can use the values inside. This way, you get an easy light/dark theme!

JobCard

no documentation here, but worry not, it'll come real soon, promise!

BingoInput

no documentation here, but worry not, it'll come real soon, promise!

Project setup

yarn install

Build the bundle

yarn run build-bundle

Publish to npm

  1. Bump version in package.json
  2. Run npm publish
  3. Publish
0.5.29

5 years ago

0.5.28

5 years ago

0.5.27

5 years ago

0.5.26

5 years ago

0.5.25

5 years ago

0.5.24

5 years ago

0.5.23

5 years ago

0.5.22

5 years ago

0.5.21

5 years ago

0.5.20

5 years ago

0.5.19

5 years ago

0.5.18

5 years ago

0.5.17

5 years ago

0.5.16

5 years ago

0.5.15

5 years ago

0.5.14

5 years ago

0.5.13

5 years ago

0.5.12

5 years ago

0.5.11

5 years ago

0.5.9

5 years ago

0.5.8

5 years ago

0.5.7

5 years ago

0.5.6

5 years ago

0.5.5

5 years ago

0.5.4

5 years ago

0.5.3

5 years ago

0.5.2

5 years ago

0.5.1

5 years ago

0.5.0

5 years ago

0.4.10

5 years ago

0.4.9

5 years ago

0.4.8

5 years ago

0.4.7

5 years ago

0.4.6

5 years ago

0.4.5

5 years ago

0.4.4

5 years ago

0.4.3

5 years ago

0.4.2

5 years ago

0.4.1

5 years ago

0.4.0

5 years ago

0.3.13

5 years ago

0.3.12

5 years ago

0.3.11

5 years ago

0.3.10

5 years ago

0.3.9

5 years ago

0.3.8

5 years ago

0.3.7

5 years ago

0.3.6

5 years ago

0.3.5

5 years ago

0.3.4

5 years ago

0.3.3

5 years ago

0.3.2

5 years ago

0.3.1

5 years ago

0.3.0

5 years ago

0.2.2

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.5

5 years ago

0.1.4

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago