Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4089b29

Browse files
used button from native-base
1 parent 51f1a76 commit 4089b29

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

‎src/baseComponents/Header/Header.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import React, {Component} from 'react';
2-
import {Header, Left, Body, Right,Button, Icon, Title,Text} from 'native-base';
2+
import {Header, Left, Body, Button, Icon, Title} from 'native-base';
33
import { withNavigation } from 'react-navigation';
44

55
class BaseHeader extends Component {

‎src/components/containers/sampleContainer/SampleContainer.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React, {Component, Fragment} from 'react';
22
import {connect} from 'react-redux';
33
import SampleComponent from '../../presentational/sampleComponent/SampleComponent';
4-
import {Button} from 'react-native';
4+
import {Button,Text} from 'native-base';
55
import {sampleActionCreator} from './../../../actionCreators/sampleActionCreator';
66
import BaseHeader from "../../../baseComponents/Header/Header";
77

@@ -14,7 +14,7 @@ class SampleContainer extends Component {
1414
counterVal={this.props.counterVal}
1515
updateCounter={() => this.props.updateCounter(1)}
1616
componentLabel={'Sample component is loading inside sample container with counter val:'}/>
17-
<Button onPress={() => this.props.navigation.navigate('SecondScreen')}title={'Navigate'}/>
17+
<Button style={{alignSelf:'center'}}transparentonPress={() => this.props.navigation.navigate('SecondScreen')}><Text>Navigate</Text></Button>
1818
</Fragment>
1919
);
2020
}

‎src/components/presentational/sampleComponent/SampleComponent.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import React from 'react';
2-
import {StyleSheet, Text, View, Button} from 'react-native';
2+
import {View} from 'react-native';
3+
import {Button, Text} from 'native-base';
34

45
const SampleComponent = ({componentLabel = 'default prop label', counterVal, updateCounter}) => {
56
return (
67
<View style={{marginTop: 100, marginLeft: 20, marginRight: 20}}>
78
<Text style={{textAlign:'center'}}>{componentLabel} {counterVal}</Text>
8-
<Button style={{marginTop: 30}} onPress={updateCounter}title={"Update Counter"}/>
9+
<Button style={{marginTop: 30,alignSelf:'center'}} transparentonPress={updateCounter}><Text>Update Counter</Text></Button>
910
</View>
1011
);
1112
};

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /