0.2.14 • Published 5 years ago
@symbol-it/symbolit-vue-components v0.2.14
Symbol-IT Vue Components Library
1. ⏳ Installation
npm i @symbol-it/symbolit-vue-componentsAfter installation you have import the library' style symbolit-vue-components.css
For a Nuxt project, add this line in nuxt.config.js
css: [
{ src: '@symbol-it/symbolit-vue-components/dist/symbolit-vue-components.css', lang: 'css' },
],2. 💡 Create a new component
1. Create your component X.vue in /src/components/X
2. Create index.js with exports of your component in /src/components/X
Example
import SButton from './SButton'
export { SButton }
export default SButton3. Add your component in the exports components list in /src/components/index.js
Example
export * from './SButton'4. Create a storybook story X.stories.js for your component in /src/components/X
import SButton from './SButton.vue';
export default {
title: 'Components/SButton',
component: SButton
};
const Template = (args, { argTypes }) => ({
props: Object.keys(argTypes),
components: { SButton },
template: '<s-button @onClick="onClick" v-bind="$props" >Submit</s-button>',
});
export const Primary = Template.bind({});
Primary.args = {
primary: true,
};
export const Outlined = Template.bind({});
Outlined.args = {
outline: true
};5. Test your component from storybook:
npm run storybookYou will have access to your component from http://localhost:6006/
3. 🗞 Publish your component to NPM
To publish your component, you need :
- Change the package.json version
- Once your code merged in the main branch, create a new release from github repository https://github.com/Symbol-it/symbolit-vue-components/releases
The GitHub Actions will publish it automatically after creating a new release.
0.2.14
5 years ago
0.2.13
5 years ago
0.2.12
5 years ago
0.2.11
5 years ago
0.2.10
5 years ago
0.2.9
5 years ago
0.2.8
5 years ago
0.2.7
5 years ago
0.2.6
5 years ago
0.2.5
5 years ago
0.2.4
5 years ago
0.2.3
5 years ago
0.2.2
5 years ago
0.2.1
5 years ago
0.1.17
5 years ago
0.1.16
5 years ago
0.1.15
5 years ago
0.1.14
5 years ago
0.1.13
5 years ago
0.1.12
5 years ago
0.1.11
5 years ago
0.1.10
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
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