Skip to content

Commit

Permalink
Add SafeAreaView wrapper
Browse files Browse the repository at this point in the history
Add the SafeAreaView wrapper to the OnDeviceUI addons panel
  • Loading branch information
bqrichards committed Aug 19, 2019
1 parent c3b0538 commit 553db0d
Showing 1 changed file with 14 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import React, { PureComponent } from 'react';
import { SafeAreaView } from 'react-native';
import styled from '@emotion/native';
import addons from '@storybook/addons';
import AddonsList from './list';
Expand Down Expand Up @@ -37,20 +38,24 @@ export default class Addons extends PureComponent<{}, { addonSelected: string }>

if (Object.keys(this.panels).length === 0) {
return (
<NoAddonContainer>
<Label>No addons loaded.</Label>
</NoAddonContainer>
<SafeAreaView style={{ flex: 1 }}>
<NoAddonContainer>
<Label>No addons loaded.</Label>
</NoAddonContainer>
</SafeAreaView>
);
}

return (
<Container>
<AddonsList
onPressAddon={this.onPressAddon}
panels={this.panels}
addonSelected={addonSelected}
/>
<AddonWrapper addonSelected={addonSelected} panels={this.panels} />
<SafeAreaView style={{ flex: 1 }}>
<AddonsList
onPressAddon={this.onPressAddon}
panels={this.panels}
addonSelected={addonSelected}
/>
<AddonWrapper addonSelected={addonSelected} panels={this.panels} />
</SafeAreaView>
</Container>
);
}
Expand Down

0 comments on commit 553db0d

Please sign in to comment.