Box align
This commit is contained in:
1 parent
cced734dc4
commit
c0694b0953
2 files changed
+9
-3
No files matched your search
@@ -1,18 +1,22 @@
|
||||
.box {
|
||||
display: flex;
|
||||
/* align-items: baseline; */
|
||||
align-items: center;
|
||||
align-items: baseline;
|
||||
|
||||
justify-content: flex-start;
|
||||
flex-wrap: nowrap;
|
||||
flex-direction: row;
|
||||
}
|
||||
|
||||
.box.align {
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.box.wrap {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.box.center {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,6 +10,7 @@ export type BoxProps = {
|
||||
children?: React.ReactNode
|
||||
style?: React.CSSProperties
|
||||
wrap?: boolean
|
||||
align?: boolean
|
||||
vertical?: boolean
|
||||
center?: boolean
|
||||
}
|
||||
@@ -19,11 +20,12 @@ export const Box: React.FC<BoxProps> = ({
|
||||
wrap = false,
|
||||
vertical = false,
|
||||
center = false,
|
||||
align = true,
|
||||
style,
|
||||
...props
|
||||
}) => {
|
||||
const newProps = {
|
||||
className: cx(s.box, { vertical, center, wrap }),
|
||||
className: cx(s.box, { vertical, align, center, wrap }),
|
||||
style,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user