Added page component
This commit is contained in:
parent
b559b0b2e4
commit
a574ae40dd
2 changed files with 32 additions and 0 deletions
12
src/builtin-components/Page/Page.sass
Normal file
12
src/builtin-components/Page/Page.sass
Normal 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
|
||||
20
src/builtin-components/Page/Page.tsx
Normal file
20
src/builtin-components/Page/Page.tsx
Normal 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>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue