Created
September 19, 2021 12:27
-
-
Save gpDA/af9375c744782c8e0d831559592ea34a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// want to go over | |
// 1 - use of functional components | |
// 2 - dynamic component `component :is` | |
<template functional> | |
<header | |
:class="[ | |
`${props.blockName}__text-head`, | |
{'gls-download-content__text-head--no-msg': | |
props.blockName === 'gls-download-content' && !props.commentMessage}]" | |
> | |
<component | |
:is="props.startWithH2 ? 'h2' : 'h1'" | |
class="text-head__title" | |
> | |
{{ props.headerText[0] }} | |
</component> | |
<component | |
:is="props.startWithH2 ? 'h3' : 'h2'" | |
class="text-head__subtitle" | |
> | |
{{ props.headerText[1] }} | |
</component> | |
</header> | |
</template> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment