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
@@ -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,
|
||||
}
|
||||
})
|
||||
Reference in new issue
Block a user