Changed to alignment mode
This commit is contained in:
parent
371498f892
commit
d083411adf
2 changed files with 13 additions and 10 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
</>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue