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
margin: 2rem
// width: 100vw
height: auto
.page-column
.column
@extend .page
display: flex
flex-direction: column
flex-wrap: wrap
text-align: center
justify-content: 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 { Show } from 'solid-js'
import { Show, Switch, Match } from 'solid-js'
interface Props {
children?: any
column?: boolean
alignment?: 'row' | 'column'
}
export default (props: Props) => {
return (
<>
<Show when={props.column}>
<main class="page-column">{props.children}</main>
<Show when={props.alignment}>
<main class={props.alignment}>{props.children}</main>
</Show>
<Show when={!props.column}>
<Show when={!props.alignment}>
<main class="page">{props.children}</main>
</Show>
</>