Spacer typings improved; moved to separate component

This commit is contained in:
tmshv committed 2020-02-18 14:57:17 +03:00
1 parent 01eaffaf14
commit d0a11deae8
4 files changed
+16 -11

No files matched your search

-8
View File
@@ -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,
}
})