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

+11
View File
@@ -0,0 +1,11 @@
import { createElement } from 'react'
export type SpacerProps = {
as?: keyof HTMLElementTagNameMap
}
export const Spacer: React.FC<SpacerProps> = ({ as = 'div' }) => createElement(as, {
style: {
flex: 1,
}
})