refactor: rename Files to StickySideColumns and update css
This commit is contained in:
parent
b3155cce0d
commit
5ffedb68d6
@ -22,3 +22,8 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
grid-gap: 15px;
|
grid-gap: 15px;
|
||||||
}
|
}
|
||||||
|
.content {
|
||||||
|
max-width: 550px;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
@ -1,29 +1,26 @@
|
|||||||
import { PropsWithChildren, ReactNode } from 'react'
|
import { PropsWithChildren, ReactNode } from 'react'
|
||||||
|
|
||||||
import styles from './Files.module.scss'
|
import styles from './StickySideColumns.module.scss'
|
||||||
|
|
||||||
interface FilesProps {
|
interface StickySideColumnsProps {
|
||||||
left: ReactNode
|
left?: ReactNode
|
||||||
right: ReactNode
|
right?: ReactNode
|
||||||
content: ReactNode
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Files = ({
|
export const StickySideColumns = ({
|
||||||
left,
|
left,
|
||||||
right,
|
right,
|
||||||
content,
|
|
||||||
children
|
children
|
||||||
}: PropsWithChildren<FilesProps>) => {
|
}: PropsWithChildren<StickySideColumnsProps>) => {
|
||||||
return (
|
return (
|
||||||
<div className={styles.container}>
|
<div className={styles.container}>
|
||||||
<div className={`${styles.sidesWrap} ${styles.files}`}>
|
<div className={`${styles.sidesWrap} ${styles.files}`}>
|
||||||
<div className={styles.sides}>{left}</div>
|
<div className={styles.sides}>{left}</div>
|
||||||
</div>
|
</div>
|
||||||
<div className={styles.content}>{content}</div>
|
<div className={styles.content}>{children}</div>
|
||||||
<div className={styles.sidesWrap}>
|
<div className={styles.sidesWrap}>
|
||||||
<div className={styles.sides}>{right}</div>
|
<div className={styles.sides}>{right}</div>
|
||||||
</div>
|
</div>
|
||||||
{children}
|
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user