Created
February 20, 2019 12:18
-
-
Save lee-chase/3f3eab58fabe2857767fe9cf1660cadc to your computer and use it in GitHub Desktop.
@carbon/vue/exmaple
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div class="hello"> | |
<cv-text-input | |
:label="label" | |
placeholder="What is yrou name?" | |
v-model="yourName" | |
></cv-text-input> | |
<cv-link | |
href="https://github.com/carbon-design-system/carbon-components-vue" | |
>@carbon/vue on github</cv-link | |
> | |
<cv-link href="https://www.npmjs.com/package/@carbon/vue" | |
>@carbon/vue on npm</cv-link | |
> | |
<cv-link href="http://http://vue.carbondesignsystem.com" | |
>Storybook samples</cv-link | |
> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: "HelloWorld", | |
data() { | |
return { | |
yourName: "" | |
}; | |
}, | |
computed: { | |
label() { | |
return `Let's say hello properly: "Hello ${ | |
this.yourName.length ? this.yourName : "World!" | |
}"`; | |
} | |
} | |
}; | |
</script> | |
<style lang="scss" scoped> | |
.hello { | |
display: flex; | |
flex-direction: column; | |
width: 600px; | |
margin: 50px auto; | |
a { | |
margin: 20px 0 0; | |
} | |
} | |
</style> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment