Version: 3.0.0

FABs

Migrating FAB to v3 will provide a lot more design, size, color and customisation option.

Overview#

Migrating Badge components can broadly described in these points:

  • Instead of Passing Icon as child, use icon prop.

Code Comparison#

import React, { Component } from 'react';
import { Container, Header, View, Icon, Fab } from 'native-base';
export default function () {
return (
<Container>
<Header />
<View style={{ flex: 1 }}>
<Fab
direction="up"
style={{ backgroundColor: '#5067FF' }}
position="bottomRight"
>
<Icon name="share" />
</Fab>
</View>
</Container>
);
}