@storykube-pkgs/design-system
Storykube Design System
1,647
| Install | |
|---|---|
npm install @storykube-pkgs/design-system |
|
| Latest Version: | 0.1.75 |
| Vue: | 3 |
| License: | ISC |
| Last Updated: | Jun 17, 2022 |
| Links: | npm |
Maintainer: ott-fogliata
Storykube · Design System
Live: https://main--61cb95497929a8004aee05a2.chromatic.com
The Storykube Design System uses Storybook.
Learn more in Storybook tutorials.
Run
Install all dependencies
npm i
Run in localhost
# Starts Storybook in development mode
npm run storybook
Workflow
- Create new branch that names your task or component
- Write your awesome code
- Commit and push
- Create a pull request to main branch
- Ask for a code review
- Someone else will merge your code or ask for a new submit
- When the pull request is merged into main branch, a new changelog and a new version is just created: please note that the changelog will collect all your commits messages.
So, always write the commit message as in the most descriptive way possible, please. - In case your code is merged into the main branch, GitHub actions (here) will be executed in seconds
- Finally, your last change in the Design System is just deployed, built and released on https://www.npmjs.com/package/@storykube-pkgs/design-system
Usage
Install in Vue3
# with npm
npm i @storykube-pkgs/design-system
# with yarn
yarn add @storykube-pkgs/design-system
Here the URL to manage the package.
Please, ask the admin to enable your account.
https://www.npmjs.com/settings/storykube-pkgs/packages
Notes
- Extended version of Storybook Readme.
- Storybook Distribution Setup.
- Component Driven User Interfaces guidelines, here.
STORIES
Le stories sono come delle permutazioni del component principale, ci possono essere diverse stories per ogni componente
Come creare una stories
- accedere alla cartella stories e creare al suo interno
i seguenti files:
Nome.vue --> questo file definirà il nostro component;
Nome.stories.js --> in questo file importeremo il component e andremo a definire le varie stories del component;
nome.scss (oppure nome.css) --> questo file darà uno stile al component in generale e alle stories, questo file sarà importato nel component Nome.vue.
( N.B. una best practice emersa nella documentazione è quella di nominare i file nello stesso modo, il component e il file stories in PascalCase il file css in camelCase ).
- nel component Nome.vue, aprire il tag
<template></template>e definire al suo interno la struttura html del component; subito dopo aprire il tag<script></script>. - cosa fare nel tag
<script/>del component:
- importare le proprietà reactive e computed da vue:
import { reactive, computed } from 'vue'; - importare il foglio di stile:
import './name.scss'oppureimport './name.css'
( il path cambia in base a dove si trova il file di stile ) - creare un " export default {} " statement che ci permetterà di richiamare props, funzioni e altri valori dichiarati al suo interno fuori dal componennt, in questo caso importeremo tutto nel file Name.stories.js.
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 0.1.75 | ^3.2.26 | ISC | |
| 0.1.74 | ^3.2.26 | ISC | |
| 0.1.73 | ^3.2.26 | ISC | |
| 0.1.72 | ^3.2.26 | ISC | |
| 0.1.71 | ^3.2.26 | ISC | |
| 0.1.70 | ^3.2.26 | ISC | |
| 0.1.69 | ^3.2.26 | ISC | |
| 0.1.68 | ^3.2.26 | ISC | |
| 0.1.67 | ^3.2.26 | ISC | |
| 0.1.66 | ^3.2.26 | ISC | |
| 0.1.65 | ^3.2.26 | ISC | |
| 0.1.64 | ^3.2.26 | ISC | |
| 0.1.63 | ^3.2.26 | ISC | |
| 0.1.62 | ^3.2.26 | ISC | |
| 0.1.61 | ^3.2.26 | ISC | |
| 0.1.60 | ^3.2.26 | ISC | |
| 0.1.59 | ^3.2.26 | ISC | |
| 0.1.58 | ^3.2.26 | ISC | |
| 0.1.57 | ^3.2.26 | ISC | |
| 0.1.56 | ^3.2.26 | ISC | |
| 0.1.55 | ^3.2.26 | ISC | |
| 0.1.54 | ^3.2.26 | ISC | |
| 0.1.53 | ^3.2.26 | ISC | |
| 0.1.52 | ^3.2.26 | ISC | |
| 0.1.51 | ^3.2.26 | ISC | |
| 0.1.50 | ^3.2.26 | ISC | |
| 0.1.49 | ^3.2.26 | ISC | |
| 0.1.48 | ^3.2.26 | ISC | |
| 0.1.47 | ^3.2.26 | ISC | |
| 0.1.46 | ^3.2.26 | ISC |
Showing the latest 30 of 75. See every release on npm