Cherry-picked changes from commit 145359e226
This commit is contained in:
parent
1f68cf3797
commit
681afdc4bd
3 changed files with 53 additions and 5 deletions
1
src/common-components/text-block/text-block.spec.js
Normal file
1
src/common-components/text-block/text-block.spec.js
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
test.todo("some test to be written in the future");
|
||||||
37
src/common-components/text-block/text-block.vue
Normal file
37
src/common-components/text-block/text-block.vue
Normal file
|
|
@ -0,0 +1,37 @@
|
||||||
|
<template>
|
||||||
|
<div class="text-block d-flex w-100 mt-4" :class="[justifyText, typeStyle, fontWeight]" v-html="this.TextBlockCopy"></div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
name: 'textBlock',
|
||||||
|
props: {
|
||||||
|
justifyText: String,// left, right, center
|
||||||
|
typeStyle: String, // h1-h6, body, small, label, caption (see Figma or Confluence documentation)
|
||||||
|
fontWeight: String,// bold=500, default is 400
|
||||||
|
cmsWidgetName: String,
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
TextBlockCopy(){
|
||||||
|
return this.getCmsContent(this.cmsWidgetName, "Text");
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.text-block {
|
||||||
|
&.left {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
&.right {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
|
&.center {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
&.bold {
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
//Typography
|
//Typography
|
||||||
p {
|
p,
|
||||||
font-size: 16px;
|
body {
|
||||||
|
font-size: 1rem;
|
||||||
line-height: 1.625;
|
line-height: 1.625;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
@ -33,12 +34,21 @@ h6,.h6 {
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
label {
|
.small {
|
||||||
|
font-size: .875rem;
|
||||||
|
line-height: 1.7;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
label,
|
||||||
|
.label {
|
||||||
|
font-size: 1rem;
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
}
|
}
|
||||||
|
|
||||||
caption {
|
caption,
|
||||||
|
.caption {
|
||||||
font-size: .75rem;
|
font-size: .75rem;
|
||||||
line-height: 1.7;
|
line-height: 1.7;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
|
|
@ -54,4 +64,4 @@ caption {
|
||||||
font-size: 1rem !important;
|
font-size: 1rem !important;
|
||||||
line-height: 1.4;
|
line-height: 1.4;
|
||||||
font-weight: 500;
|
font-weight: 500;
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue