0.1.75 • Published 2 years ago

@storykube-pkgs/design-system v0.1.75

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

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

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: 1) importare le proprietà reactive e computed da vue: import { reactive, computed } from 'vue'; 2) importare il foglio di stile: import './name.scss' oppure import './name.css' ( il path cambia in base a dove si trova il file di stile ) 3) 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.
0.1.75

2 years ago

0.1.74

2 years ago

0.1.73

2 years ago

0.1.70

2 years ago

0.1.71

2 years ago

0.1.72

2 years ago

0.1.67

2 years ago

0.1.68

2 years ago

0.1.69

2 years ago

0.1.63

2 years ago

0.1.64

2 years ago

0.1.65

2 years ago

0.1.66

2 years ago

0.1.61

2 years ago

0.1.62

2 years ago

0.1.52

2 years ago

0.1.53

2 years ago

0.1.54

2 years ago

0.1.10

2 years ago

0.1.55

2 years ago

0.1.11

2 years ago

0.1.56

2 years ago

0.1.12

2 years ago

0.1.57

2 years ago

0.1.13

2 years ago

0.1.58

2 years ago

0.1.14

2 years ago

0.1.59

2 years ago

0.1.15

2 years ago

0.1.50

2 years ago

0.1.51

2 years ago

0.1.49

2 years ago

0.1.41

2 years ago

0.1.42

2 years ago

0.1.43

2 years ago

0.1.44

2 years ago

0.1.45

2 years ago

0.1.46

2 years ago

0.1.47

2 years ago

0.1.48

2 years ago

0.1.40

2 years ago

0.1.38

2 years ago

0.1.8

2 years ago

0.1.39

2 years ago

0.1.7

2 years ago

0.1.9

2 years ago

0.1.4

2 years ago

0.1.6

2 years ago

0.1.5

2 years ago

0.1.30

2 years ago

0.1.31

2 years ago

0.1.32

2 years ago

0.1.33

2 years ago

0.1.34

2 years ago

0.1.35

2 years ago

0.1.36

2 years ago

0.1.37

2 years ago

0.1.27

2 years ago

0.1.28

2 years ago

0.1.29

2 years ago

0.1.20

2 years ago

0.1.21

2 years ago

0.1.22

2 years ago

0.1.23

2 years ago

0.1.24

2 years ago

0.1.25

2 years ago

0.1.26

2 years ago

0.1.60

2 years ago

0.1.16

2 years ago

0.1.17

2 years ago

0.1.18

2 years ago

0.1.19

2 years ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.0

2 years ago