Skip to content
This repository was archived by the owner on Feb 19, 2025. It is now read-only.

Commit 6142d31

Browse files
committed
chore: add size default to <Space> component
1 parent dc2c203 commit 6142d31

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/components/Space/Space.tsx

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import React from 'react'
22
import './Space.css'
33

4-
function Space (props: any) {
5-
const { direction, size, className, block, style, minus } = props
4+
function Space ({direction, size = 2, className, block, style, minus, children}: any) {
65

76
const classes = []
87
classes.push(direction === 'vertical' ? 'sbui-space-col' : 'sbui-space-row')
@@ -16,7 +15,7 @@ function Space (props: any) {
1615

1716
return (
1817
<div className={classes.join(' ')} style={style}>
19-
{props.children}
18+
{children}
2019
</div>
2120
)
2221
}

0 commit comments

Comments
 (0)