@crystal-creations/crystal-components
A vuetify based component library from crystal creations.
Usage in nuxt 3
-
Install with
npm install @crystal-creations/crystal-components
-
Add the following to your
nuxt.config.ts
.export default defineNuxtConfig({ app: { // ... modules: [ // ... "@crystal-creations/crystal-components/nuxt", ], }, });
-
Add the component to your Vue component.
<template> <CLicenseCard :software-info="{ name: '@crystal-creations/crystal-components', version: 'v1.0.0', repositoryLink: 'https://github.com/Crystal-Creations-GbR/crystal-components', notice: 'MIT', }" ></CLicenseCard> </template>
Usage in vue 3
-
Install with
npm install @crystal-creations/crystal-components
-
Add the following to your Vue
main.ts
.import { CLicenseCard } from "@crystal-creations/crystal-components"; import "@crystal-creations/crystal-components/styles"; // ... const app = createApp(App) app.component("CLicenseCard", CLicenseCard);
-
Add the component to your Vue component.
<template> <CLicenseCard :software-info="{ name: '@crystal-creations/crystal-components', version: 'v1.0.0', repositoryLink: 'https://github.com/Crystal-Creations-GbR/crystal-components', notice: 'MIT', }" ></CLicenseCard> </template>
Development
There are two ways develop new or improve existing components:
- Creating a new Story in the
stories/
directory for the new component and running storybook (recommended) - Developing inside a nuxt project
- Install the module in a nuxt project using the instructions above
- Run
yarn link
in the component repo - Run
yarn link @crystal-creations/crystal-components
in the nuxt project - You can now use components from the library with hot reloading etc.
To add a new component:
- Create the component in
src/components
- Add it to
src/index.ts
andsrc/nuxt.mjs