Skip to content

Latest commit

 

History

History
executable file
·
43 lines (39 loc) · 1.77 KB

IconButton.md

File metadata and controls

executable file
·
43 lines (39 loc) · 1.77 KB

##button-icon-headref

Icon Button

The Icon Buttons, can take text and/or icon as child elements inside the Button.
This goes as simple as this: include your choice of icon using Icon component within the Button component.

Preview ios button-icon-headref Preview android button-icon-headref

Syntax

import React, { Component } from 'react';
import { Container, Content, Button, Icon, Text } from 'native-base';
export default class IconButtonExample extends Component {
    render() {
        return (
          <Container>
              <Content>
                  <Button iconLeft light>
                      <Icon name='arrow-back' />
                      <Text>Back</Text>
                  </Button>
                  <Button iconRight light>
                      <Text>Next</Text>
                      <Icon name='arrow-forward' />
                  </Button>
                  <Button iconLeft>
                      <Icon name='home' />
                      <Text>Home</Text>
                  </Button>
                  <Button transparent primary iconLeft>
                      <Icon name='beer' />
                      <Text>Pub</Text>
                  </Button>
                  <Button dark iconLeft>
                      <Icon name='cog' />
                      <Text>Settings</Text>
                  </Button>
              </Content>
          </Container>
      );
  }
}