unicorn-demo-app 8.0.1 → 8.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "unicorn-demo-app",
3
- "version": "8.0.1",
3
+ "version": "8.1.0",
4
4
  "main": "src/index.js",
5
5
  "author": "Ethan Sharabi <ethan.shar@gmail.com>",
6
6
  "license": "MIT",
@@ -4726,8 +4726,8 @@ exports[`TextField Screen renders screen 1`] = `
4726
4726
  hitSlop={
4727
4727
  {
4728
4728
  "bottom": 7.5,
4729
- "left": 10,
4730
- "right": 10,
4729
+ "left": 24,
4730
+ "right": 24,
4731
4731
  "top": 7.5,
4732
4732
  }
4733
4733
  }
@@ -5,6 +5,7 @@ import {renderBooleanOption} from '../ExampleScreenPresenter';
5
5
 
6
6
  interface State {
7
7
  showButton: boolean;
8
+ showPrimary: boolean;
8
9
  showSecondary: boolean;
9
10
  showVertical: boolean;
10
11
  }
@@ -12,6 +13,7 @@ interface State {
12
13
  export default class FloatingButtonScreen extends Component<{}, State> {
13
14
  state = {
14
15
  showButton: true,
16
+ showPrimary: true,
15
17
  showSecondary: true,
16
18
  showVertical: true,
17
19
  fullWidth: false
@@ -36,6 +38,7 @@ export default class FloatingButtonScreen extends Component<{}, State> {
36
38
  </Text>
37
39
  {renderBooleanOption.call(this, 'Show Floating Button', 'showButton')}
38
40
  {renderBooleanOption.call(this, 'Full Width Button', 'fullWidth')}
41
+ {renderBooleanOption.call(this, 'Show Primary Button', 'showPrimary')}
39
42
  {renderBooleanOption.call(this, 'Show Secondary Button', 'showSecondary')}
40
43
  {renderBooleanOption.call(this, 'Button Layout Vertical', 'showVertical')}
41
44
 
@@ -67,10 +70,14 @@ export default class FloatingButtonScreen extends Component<{}, State> {
67
70
  <FloatingButton
68
71
  visible={this.state.showButton}
69
72
  fullWidth={this.state.fullWidth}
70
- button={{
71
- label: 'Approve',
72
- onPress: this.close
73
- }}
73
+ button={
74
+ this.state.showPrimary
75
+ ? {
76
+ label: 'Approve',
77
+ onPress: this.close
78
+ }
79
+ : undefined
80
+ }
74
81
  secondaryButton={
75
82
  showSecondary
76
83
  ? {
@@ -1,5 +1,11 @@
1
1
  import _ from 'lodash';
2
- import {data} from './MockData';
2
+ let data;
3
+ try {
4
+ data = require('./MockData').data;
5
+ } catch (error) {
6
+ console.warn('Error loading MockData', error);
7
+ data = [];
8
+ }
3
9
 
4
10
  const PAGE_SIZE = 400;
5
11
  const FAKE_FETCH_TIME = 1500;