Sunday 19 January 2020

NativeBase Button


import React from 'react';
import {
  Container, Header, Title, Content, Footer,
  FooterTab, Button, Left, Right, Body, Icon, Text,
  Accordion,
} from 'native-base';

export default function App() {
  return (
    <Container>
      <Header>
        <Body>
          <Title>Button</Title>
        </Body>
      </Header>
      <Content padder>
        <Button rounded dark style={{ width: 100, justifyContent: 'center' }}
          onPress={() => alert('button pressed')}
          onLongPress={() => alert('long press')}
        ><Text> Round </Text></Button>

        <Button bordered large danger style={{ width: 200, justifyContent: 'center' }}>
          <Text>boardered</Text>
        </Button>

        <Button small iconLeft success style={{ width: 100, justifyContent: 'center' }}>
          <Icon name='beer' />
          <Text>Pub</Text>
        </Button>

        <Button disabled style={{ width: 60, justifyContent: 'center' }}>
          <Icon name='cog' />
        </Button>
      </Content>
    </Container>
  );
}


No comments:

Post a Comment