mirror of
https://github.com/remvze/moodist.git
synced 2025-10-16 19:40:31 -04:00
refactor: add variant to container
This commit is contained in:
parent
f66a6ffde7
commit
831a9c8ea0
@ -35,9 +35,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
& .desc {
|
& .desc {
|
||||||
width: 100%;
|
|
||||||
max-width: 450px;
|
|
||||||
margin: 0 auto;
|
|
||||||
line-height: 1.6;
|
line-height: 1.6;
|
||||||
color: var(--color-foreground-subtle);
|
color: var(--color-foreground-subtle);
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -18,7 +18,7 @@ export function About() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section className={styles.about}>
|
<section className={styles.about}>
|
||||||
<Container>
|
<Container tight>
|
||||||
<div className={styles.iconContainer}>
|
<div className={styles.iconContainer}>
|
||||||
<div className={styles.tail} />
|
<div className={styles.tail} />
|
||||||
<div className={styles.icon}>
|
<div className={styles.icon}>
|
||||||
|
@ -2,4 +2,8 @@
|
|||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 600px;
|
max-width: 600px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
|
||||||
|
&.tight {
|
||||||
|
max-width: 450px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,13 @@ import styles from './container.module.css';
|
|||||||
interface ContainerProps {
|
interface ContainerProps {
|
||||||
children: React.ReactNode;
|
children: React.ReactNode;
|
||||||
className?: string;
|
className?: string;
|
||||||
|
tight?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function Container({ children, className }: ContainerProps) {
|
export function Container({ children, className, tight }: ContainerProps) {
|
||||||
return <div className={cn(styles.container, className)}>{children}</div>;
|
return (
|
||||||
|
<div className={cn(styles.container, className, tight && styles.tight)}>
|
||||||
|
{children}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user