element-plus/docs/.vitepress/vitepress/components/demo/vp-example.vue
云游君 316efcc045
feat(theme-chalk): dark palette & common color mixins (#6999)
* feat(theme-chalk): dark palette & common color mixins

* chore: move layouts var

* feat: add dark transparent colors for designer

* refactor: remove example-showcase dark bg
2022-04-04 22:46:00 +08:00

41 lines
912 B
Vue

<script setup lang="ts">
defineProps({
file: {
type: String,
required: true,
},
demo: {
type: Object,
required: true,
},
})
</script>
<template>
<div class="example-showcase">
<ClientOnly>
<component :is="demo" v-if="demo" v-bind="$attrs" />
</ClientOnly>
</div>
</template>
<style lang="scss" scoped>
.example-showcase {
padding: 1.5rem;
margin: 0.5px;
background-color: var(--bg-color);
&.transparent-enabled {
background-image: linear-gradient(
45deg,
rgb(249, 249, 250) 25%,
transparent 25%
),
linear-gradient(135deg, rgb(249, 249, 250) 25%, transparent 25%),
linear-gradient(45deg, transparent 75%, rgb(249, 249, 250) 75%),
linear-gradient(135deg, transparent 75%, rgb(249, 249, 250) 75%);
background-size: 20px 20px;
background-position: 0px 0px, 10px 0px, 10px -10px, 0px 10px;
}
}
</style>