Added page component

This commit is contained in:
Patrick Alvin Alcala 2025-08-27 15:09:19 +08:00
parent b559b0b2e4
commit a574ae40dd
2 changed files with 32 additions and 0 deletions

View file

@ -0,0 +1,12 @@
.page
margin: 2rem
// width: 100vw
.page-column
display: flex
flex-direction: column
flex-wrap: wrap
justify-content: center
align-items: center
align-content: center
margin: 2rem

View file

@ -0,0 +1,20 @@
import './Page.sass'
import { Show } from 'solid-js'
interface Props {
children?: any
column?: boolean
}
export default (props: Props) => {
return (
<>
<Show when={props.column}>
<main class="page-column">{props.children}</main>
</Show>
<Show when={!props.column}>
<main class="page">{props.children}</main>
</Show>
</>
)
}