0.1.13 • Published 4 years ago

cl-components v0.1.13

Weekly downloads
18
License
-
Repository
-
Last release
4 years ago

CenturyLink Components

How to use existing components

Within the terminal, at the root of you app run the following.

yarn install @centurylink/cl-components

Then in the parent component that you wish to add the component add the following to make your component usable.

<script lang="ts">
import { Component, Vue } from 'vue-property-decorator';
import * as Components from '@centurylink/cl-components';

@Component({
    components: {
        HelloWorld: Components.default.HelloWorld,
        LineChart: Components.default.LineChart,
    },
})
export default class App extends Vue {}
</script>

<template>
    <div>
        <HelloWorld />

        <LineChart />
    </div>
</template>

How to create components

In this vue project, create a folder with a unique name for your component, then add your code to it. If you want your component to be available to others using the cl-component add it to the src/components/index.ts file.

import HelloWorld from './HelloWorld/HelloWorld.vue';
import LineChart from './LineChart/LineChart.vue';

export default {
    HelloWorld,
    LineChart,
};