Skip to content

Commit

Permalink
refactor: wt-page-wrapper colors [WTEL-3946]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Nov 29, 2023
1 parent 52948fd commit 24c65cc
Show file tree
Hide file tree
Showing 5 changed files with 54 additions and 40 deletions.
20 changes: 20 additions & 0 deletions docs/pages/webitel-ui/components/wt-page-wrapper/Readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<script setup>
import Docs from './wt-page-wrapper-docs.vue';
import ExamplePageWrapper from './examples/example-page-wrapper.vue';
</script>

# WtPageWrapper

## Props
::: raw
<Docs />
:::

## Example Page Wrapper
::: raw
<ExamplePageWrapper />
:::

::: details Code
<<< ./examples/example-page-wrapper.vue
:::
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<script setup>
</script>

<template>
<wt-page-wrapper>
<template #header>
<div style="height: 40px; background: lightblue;" />
</template>
<template #actions-panel>
<div style="height: 80px; background: lightblue;" />
</template>
<template #main>
<div style="width: 100%; height: 320px; background: lightblue;" />
</template>
</wt-page-wrapper>
</template>

<style lang="scss" scoped>
</style>
Original file line number Diff line number Diff line change
@@ -1,43 +1,10 @@
<template>
<section>
<h2>Page Wrapper</h2>
<article>
<div class="example-wrapper">
<wt-page-wrapper style="background: var(--page-bg-color);">
<template #header>
<div style="height: 40px; background: lightblue;" />
</template>
<template #actions-panel>
<div style="height: 80px; background: lightblue;" />
</template>
<template #main>
<div style="width: 100%; height: 320px; background: lightblue;" />
</template>
</wt-page-wrapper>
</div>
<pre><code
class="language-html"
>
&lt;wt-page-wrapper&gt;
&lt;template v-slot:header&gt;
&lt;wt-headline&gt;&lt;template v-slot:title>Wt Headline&lt;/template&gt;&lt;/wt-headline&gt;
&lt;/template&gt;
&lt;template v-slot:actions-panel&gt;
&lt;div style="height: 150px; background: lightblue;"&gt;&lt;/div&gt;
&lt;/template&gt;
&lt;template v-slot:main&gt;
&lt;div style="width: 100%; height: 500px; background: lightblue;"&gt;&lt;/div&gt;
&lt;/template&gt;
&lt;/wt-page-wrapper&gt;
</code></pre>
</article>
<component-props
:properties="properties"
/>
<component-slots
:slots="slots"
/>
</section>
<component-props
:properties="properties"
/>
<component-slots
:slots="slots"
/>
</template>

<script>
Expand Down
6 changes: 6 additions & 0 deletions src/components/wt-page-wrapper/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,10 @@
--page-wrapper-padding: var(--spacing-sm);
--page-wrapper-section-padding: var(--spacing-sm);
--page-wrapper-section-gap: var(--spacing-sm);

--wt-page-wrapper-background-color: var(--grey-lighten-5);
}

:root.theme--dark {
--wt-page-wrapper-background-color: var(--grey-darken-4);
}
2 changes: 1 addition & 1 deletion src/components/wt-page-wrapper/wt-page-wrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export default {
box-sizing: border-box;
padding: var(--page-wrapper-section-padding);
border-radius: var(--border-radius);
background: var(--main-color);
background: var(--wt-page-wrapper-background-color);
}
.wt-page-wrapper__main {
Expand Down

0 comments on commit 24c65cc

Please sign in to comment.