Spacer
Usage
Awesome UI
Blossom UI
function SpacerUsage() {
return (
<View>
<Text>Awesome UI</Text>
<Spacer height={20} />
<Text>Blossom UI</Text>
</View>
)
}
Vertical
Hello
World
function SpacerVertical() {
return (
<View row>
<Text>Hello</Text>
<Spacer width={100} height={50} />
<Text>World</Text>
</View>
)
}
On Background
Awesome UI
Blossom UI
function SpacerOnBackground() {
return (
<View style={{backgroundColor: 'gray'}}>
<Text>Awesome UI</Text>
<Spacer height={20} />
<Text>Blossom UI</Text>
</View>
)
}
Props
Prop | Data Type | Default Value | Description |
---|---|---|---|
Extends | ViewProps$1 | -- | Inherits properties from ViewProps$1 |
width | number | -- | Width of the spacer |
height | number | -- | Height of the spacer |