Skip to content

Latest commit

 

History

History
61 lines (53 loc) · 2.36 KB

IconButton.md

File metadata and controls

61 lines (53 loc) · 2.36 KB

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.


IOS Android
*Syntax*
import React, { Component } from 'react';
import { Container, Content, Button, Icon } from 'native-base';
​
export default class IconButtonExample extends Component {
    render() {
        return (
            <Container>
                <Content>
                    <Button primary>
                        <Icon name='ios-home' />
                        Home
                    </Button>

                    <Button success iconRight>
                        Next
                        <Icon name='ios-arrow-forward' />
                    </Button>

                    <Button info>
                        Previous
                        <Icon name='ios-arrow-back' />
                    </Button>

                    <Button warning>
                        <Icon name='ios-star' />
                    </Button>

                    <Button danger>
                        <Icon name='ios-close-circle' />
                    </Button>

                    <Button style={{backgroundColor: '#384850'}} >
                        <Icon name='ios-search' style={{color: '#00c497'}}/>
                    </Button>
                </Content>
            </Container>
        );
    }
}