Spacer typings improved; moved to separate component
This commit is contained in:
1 parent
01eaffaf14
commit
d0a11deae8
4 files changed
+16
-11
No files matched your search
@@ -1,5 +1,3 @@
|
||||
import { createElement } from 'react'
|
||||
|
||||
export type BlockProps = {
|
||||
style?: React.CSSProperties
|
||||
direction: 'horizontal' | 'vertical'
|
||||
@@ -21,9 +19,3 @@ export const Block: React.FC<BlockProps> = props => {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
export const Spacer: React.FC<{ as?: string }> = ({ as = 'div' }) => createElement(as, {
|
||||
style: {
|
||||
flex: 1,
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user