vue-material/docs/src/components/ExampleBox.vue
2016-11-30 23:38:28 -02:00

57 lines
1 KiB
Vue

<template>
<md-card class="example-box">
<md-toolbar class="md-dense" v-md-theme="'white'">
<h3 class="md-title">{{ cardTitle }}</h3>
</md-toolbar>
<md-tabs md-right :md-dynamic-height="false" class="md-transparent example-tabs">
<md-tab class="example-content" md-label="Demo">
<slot name="demo"></slot>
</md-tab>
<md-tab class="code-content" md-label="Code">
<slot name="code"></slot>
</md-tab>
</md-tabs>
</md-card>
</template>
<style lang="scss">
.example-box .code-content {
.code-block {
margin: -16px;
+ .code-block {
margin-top: 40px;
}
}
}
</style>
<style lang="scss" scoped>
.example-box {
margin-bottom: 16px;
}
.md-title {
position: relative;
z-index: 3;
}
.example-tabs {
margin-top: -48px;
@media (max-width: 480px) {
margin-top: -1px;
background-color: #fff;
}
}
</style>
<script>
export default {
props: {
cardTitle: String
}
};
</script>