fix: remove custom styling, and uncessary conditional check

This commit is contained in:
Chuma McPhoy
2024-07-12 16:02:22 +02:00
parent f83f1a66b5
commit e76f613830
2 changed files with 14 additions and 22 deletions

View File

@@ -13,21 +13,13 @@
display: flex; display: flex;
justify-content: flex-end; justify-content: flex-end;
border-bottom: 1px solid var(--Base-Border-Subtle); border-bottom: 1px solid var(--Base-Border-Subtle);
align-items: center;
} }
.header:has(> h2) { .header:has(> h2) {
justify-content: space-between; justify-content: space-between;
} }
.closeBtn {
border: none;
background-color: transparent;
display: flex;
align-items: center;
padding: 0;
cursor: pointer;
}
@media and screen (min-width: 1367px) { @media and screen (min-width: 1367px) {
.content > * { .content > * {
padding: var(--Spacing-x4); padding: var(--Spacing-x4);

View File

@@ -6,6 +6,8 @@ import { CloseIcon } from "@/components/Icons"
import { SidePeekContentProps } from "@/components/TempDesignSystem/SidePeek/types" import { SidePeekContentProps } from "@/components/TempDesignSystem/SidePeek/types"
import Title from "@/components/TempDesignSystem/Text/Title" import Title from "@/components/TempDesignSystem/Text/Title"
import Button from "../../Button"
import styles from "./content.module.css" import styles from "./content.module.css"
export default function Content({ export default function Content({
@@ -18,24 +20,22 @@ export default function Content({
return isActive ? ( return isActive ? (
<aside className={styles.content}> <aside className={styles.content}>
<header className={styles.header}> <header className={styles.header}>
{title && ( <Title
<Title color="burgundy"
color="burgundy" textTransform="uppercase"
textTransform="uppercase" level={"h2"}
level={"h2"} as={"h3"}
as={"h3"} >
> {title}
{title} </Title>
</Title> <Button
)} intent="text"
<button
onClick={() => { onClick={() => {
onClose && onClose() onClose && onClose()
}} }}
className={styles.closeBtn}
> >
<CloseIcon color="burgundy" height={32} width={32} /> <CloseIcon color="burgundy" height={32} width={32} />
</button> </Button>
</header> </header>
{children} {children}
</aside> </aside>