Bladeren bron

fix(recording/native) Button import missing

master
Calin Chitu 3 jaren geleden
bovenliggende
commit
f87ce0defe

+ 44
- 0
react/features/base/react/components/native/Button.js Bestand weergeven

1
+/* @flow */
2
+
3
+import React, { Component } from 'react';
4
+import { Text, TouchableOpacity } from 'react-native';
5
+
6
+type Props = {
7
+
8
+    /**
9
+     * React Elements to display within the component.
10
+     */
11
+    children: React$Node | Object,
12
+
13
+    /**
14
+     * Handler called when the user presses the button.
15
+     */
16
+    onValueChange: Function,
17
+
18
+    /**
19
+     * The component's external style.
20
+     */
21
+    style: Object
22
+};
23
+
24
+/**
25
+ * Renders a button.
26
+ */
27
+export default class ButtonImpl extends Component<Props> {
28
+    /**
29
+     * Implements React's {@link Component#render()}, renders the button.
30
+     *
31
+     * @inheritdoc
32
+     * @returns {ReactElement}
33
+     */
34
+    render() {
35
+        return (
36
+            <TouchableOpacity
37
+                onPress = { this.props.onValueChange } >
38
+                <Text style = { this.props.style }>
39
+                    { this.props.children }
40
+                </Text>
41
+            </TouchableOpacity>
42
+        );
43
+    }
44
+}

+ 1
- 0
react/features/base/react/components/native/index.js Bestand weergeven

2
 
2
 
3
 export { default as AvatarListItem } from './AvatarListItem';
3
 export { default as AvatarListItem } from './AvatarListItem';
4
 export { default as BaseIndicator } from './BaseIndicator';
4
 export { default as BaseIndicator } from './BaseIndicator';
5
+export { default as Button } from './Button';
5
 export { default as Container } from './Container';
6
 export { default as Container } from './Container';
6
 export { default as Image } from './Image';
7
 export { default as Image } from './Image';
7
 export { default as Link } from './Link';
8
 export { default as Link } from './Link';

Laden…
Annuleren
Opslaan