Added flexbox components
This commit is contained in:
parent
5fda80674f
commit
c2d99f8b1b
4 changed files with 121 additions and 0 deletions
39
fwt/components/Column/Column.sass
Normal file
39
fwt/components/Column/Column.sass
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
.top
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-start
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.center
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-wrap: wrap
|
||||
justify-content: center
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.right
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-end
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.split
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-wrap: wrap
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.spaced
|
||||
display: flex
|
||||
flex-direction: column
|
||||
flex-wrap: wrap
|
||||
justify-content: space-around
|
||||
align-items: center
|
||||
align-content: center
|
||||
17
fwt/components/Column/Column.tsx
Normal file
17
fwt/components/Column/Column.tsx
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
import './Column.sass'
|
||||
|
||||
interface Props {
|
||||
children: any
|
||||
content: 'top' | 'center' | 'right' | 'split' | 'spaced'
|
||||
gap?: number
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<div class={props.content} style={`gap: ${props.gap}rem`}>
|
||||
{props.children}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
47
fwt/components/Row/Row.sass
Normal file
47
fwt/components/Row/Row.sass
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
.left
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-start
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.center
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: center
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.right
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: flex-end
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.split
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: space-between
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.spaced
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: space-around
|
||||
align-items: center
|
||||
align-content: center
|
||||
|
||||
.even
|
||||
display: flex
|
||||
flex-direction: row
|
||||
flex-wrap: wrap
|
||||
justify-content: space-evenly
|
||||
align-items: center
|
||||
align-content: center
|
||||
18
fwt/components/Row/Row.tsx
Normal file
18
fwt/components/Row/Row.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import './Row.sass'
|
||||
// import { Switch, Match } from 'solid-js'
|
||||
|
||||
interface Props {
|
||||
children: any
|
||||
content: 'left' | 'center' | 'right' | 'split' | 'spaced' | 'even'
|
||||
gap?: number
|
||||
}
|
||||
|
||||
export default (props: Props) => {
|
||||
return (
|
||||
<>
|
||||
<div class={props.content} style={`gap: ${props.gap}rem`}>
|
||||
{props.children}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue