Changed to alignment mode

This commit is contained in:
Patrick Alvin Alcala 2025-08-27 15:19:23 +08:00
parent 371498f892
commit d083411adf
2 changed files with 13 additions and 10 deletions

View file

@ -1,12 +1,15 @@
.page .page
margin: 2rem margin: 2rem
// width: 100vw height: auto
.page-column .column
@extend .page
display: flex display: flex
flex-direction: column flex-direction: column
flex-wrap: wrap text-align: center
justify-content: center justify-content: center
align-items: center align-items: center
align-content: center
margin: 2rem .row
@extend .column
flex-direction: row

View file

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