style: update CallToActionSection styles

This commit is contained in:
jinhojang6
2024-03-23 20:25:57 +09:00
parent 2d66e453ff
commit b413eaa579
4 changed files with 41 additions and 14 deletions
@@ -16,6 +16,12 @@
width: fit-content;
}
.mdx-cta-section__header__desktop-button {
.mdx-cta-button {
margin-top: unset;
}
}
.mdx-cta-section--align-center {
display: flex;
flex-direction: column;
@@ -247,7 +253,21 @@
}
}
@include utils.responsive('lg', 'up') {
.mdx-cta-section__header__mobile-button {
display: none;
}
}
@include utils.responsive('lg', 'down') {
.mdx-cta-section__header__desktop-button {
display: none;
}
.mdx-cta-section__header__mobile-button {
margin-top: 24px;
}
.mdx-cta-section__title {
@include lsd.typography('h3', true);
}
@@ -154,6 +154,17 @@ export const CallToActionSection: React.FC<CallToActionSectionProps> = ({
? 'list'
: 'simple'
const button = href && ctaPosition === 'top' && (
<CallToActionButton
target={target}
href={href}
className="mdx-cta-section__link"
variant={variant}
>
{label}
</CallToActionButton>
)
return (
<div
className={clsx(
@@ -174,22 +185,17 @@ export const CallToActionSection: React.FC<CallToActionSectionProps> = ({
<Typography component="h2" className={clsx('mdx-cta-section__title')}>
{title}
</Typography>
{href && ctaPosition === 'top' && (
<CallToActionButton
target={target}
href={href}
className="mdx-cta-section__link"
variant={variant}
>
{label}
</CallToActionButton>
)}
<div className="mdx-cta-section__header__desktop-button">
{button}
</div>
</div>
{description && (
<Typography component="h3" className="mdx-cta-section__description">
{description}
</Typography>
)}
<div className="mdx-cta-section__header__mobile-button">{button}</div>
{href && ctaPosition === 'bottom' && (
<CallToActionButton
target={target}
@@ -47,4 +47,9 @@
@include lsd.typography('h3');
}
}
.mdx-section-header__title {
display: flex;
flex-wrap: wrap;
}
}
@@ -345,10 +345,6 @@ a code {
overflow-x: hidden !important;
}
.navbar {
background-color: transparent;
}
h2 {
margin-top: unset !important;
}