Display: Allow to set size for SectionHeader component

pull/5649/head
Angel Fernando Quiroz Campos 1 year ago
parent 36fb8965e1
commit 5c8d354366
No known key found for this signature in database
GPG Key ID: B284841AE3E562CD
  1. 7
      assets/css/scss/organisms/_section_header.scss
  2. 18
      assets/vue/components/layout/SectionHeader.vue

@ -3,11 +3,14 @@
md:flex-row sm:items-center;
&--h2 {
@apply pb-6 ;
@apply pb-6 mb-6;
}
&--h3,
&--h4,
&--h5,
&--h6 {
@apply pb-4;
@apply pb-4 mb-4;
}
&__title {

@ -8,6 +8,11 @@ defineProps({
type: String,
required: true,
},
size: {
type: String,
required: false,
default: "2",
},
})
const cidReqStore = useCidReqStore()
@ -16,11 +21,16 @@ const { course } = storeToRefs(cidReqStore)
</script>
<template>
<div class="section-header section-header--h2">
<h2
<div
class="section-header"
:class="`section-header--h${size}`"
>
<component
:is="`h${size}`"
class="section-header__title"
v-text="title"
/>
>
{{ title }}
</component>
<div class="section-header__actions">
<StudentViewButton v-if="course" />

Loading…
Cancel
Save