fix(SW-856): fixed issues where blocks do not have titles/preambles
This commit is contained in:
@@ -24,7 +24,7 @@ export default function AccordionSection({ accordion, title }: AccordionProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContainer id={HotelHashValues.faq}>
|
<SectionContainer id={HotelHashValues.faq}>
|
||||||
{title && <SectionHeader textTransform="uppercase" title={title} />}
|
<SectionHeader textTransform="uppercase" title={title} />
|
||||||
<Accordion
|
<Accordion
|
||||||
className={`${styles.accordion} ${allAccordionsVisible ? styles.allVisible : ""}`}
|
className={`${styles.accordion} ${allAccordionsVisible ? styles.allVisible : ""}`}
|
||||||
theme="light"
|
theme="light"
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ export default function TableBlock({ data }: TableBlockProps) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<SectionContainer>
|
<SectionContainer>
|
||||||
{heading ? <SectionHeader preamble={preamble} title={heading} /> : null}
|
<SectionHeader preamble={preamble} title={heading} />
|
||||||
<div className={styles.tableWrapper}>
|
<div className={styles.tableWrapper}>
|
||||||
<ScrollWrapper>
|
<ScrollWrapper>
|
||||||
<Table
|
<Table
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ export default function SectionHeader({
|
|||||||
topTitle = false,
|
topTitle = false,
|
||||||
textTransform,
|
textTransform,
|
||||||
}: HeaderProps) {
|
}: HeaderProps) {
|
||||||
|
if (!title || !preamble || !link) {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className={styles.header}>
|
<header className={styles.header}>
|
||||||
<Title
|
<Title
|
||||||
|
|||||||
@@ -18,13 +18,13 @@
|
|||||||
|
|
||||||
.scrollWrapper.leftShadow::before {
|
.scrollWrapper.leftShadow::before {
|
||||||
left: 0;
|
left: 0;
|
||||||
background: linear-gradient(to right, rgba(0, 0, 0, 0.3), transparent);
|
background: linear-gradient(to right, rgba(128, 110, 99, 0.37), transparent);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.scrollWrapper.rightShadow::after {
|
.scrollWrapper.rightShadow::after {
|
||||||
right: 0;
|
right: 0;
|
||||||
background: linear-gradient(to left, rgba(0, 0, 0, 0.3), transparent);
|
background: linear-gradient(to left, rgba(128, 110, 99, 0.37), transparent);
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -7,6 +7,6 @@ export type HeaderProps = {
|
|||||||
}
|
}
|
||||||
preamble?: string | null
|
preamble?: string | null
|
||||||
textTransform?: HeadingProps["textTransform"]
|
textTransform?: HeadingProps["textTransform"]
|
||||||
title: string | null
|
title?: string | null
|
||||||
topTitle?: boolean
|
topTitle?: boolean
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user