Skip to content

Instantly share code, notes, and snippets.

@tellodaniel
Created April 3, 2020 22:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tellodaniel/1957038b20be5b6b076e730c030c3f2b to your computer and use it in GitHub Desktop.
Save tellodaniel/1957038b20be5b6b076e730c030c3f2b to your computer and use it in GitHub Desktop.
Configs
const tabBasedApp = (inbox, properties, contacts, profile) => {
navigation.setRoot({
root: {
bottomTabs: {
children: [
{
stack: {
options: bottomTabsOptions('inbox'),
children: [
{
component: {
name: inbox,
options: {
...componentScreenOptions('light', 'primaryColor'),
},
},
},
],
},
},
{
stack: {
options: bottomTabsOptions('properties'),
children: [
{
component: {
name: properties,
options: {
...componentScreenOptions('light', 'primaryColor'),
},
},
},
],
},
},
{
stack: {
options: bottomTabsOptions('contacts'),
children: [
{
component: {
name: contacts,
options: {
...componentScreenOptions('light', 'primaryColor'),
},
},
},
],
},
},
{
stack: {
options: bottomTabsOptions('profile'),
children: [
{
component: {
name: profile,
options: {
...componentScreenOptions('light', 'primaryColor'),
},
},
},
],
},
},
],
},
},
})
}
_showModal = (screen, props) => {
navigation.showModal({
stack: {
children: [
{
component: {
name: screen,
passProps: props,
options: {
...componentScreenOptions('dark'),
...showModalAnimation(), // { modalPresentationStyle: 'fullScreen', waitForRender: true }
},
},
},
],
},
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment