Skip to content

Latest commit

 

History

History
executable file
·
33 lines (30 loc) · 1.72 KB

File metadata and controls

executable file
·
33 lines (30 loc) · 1.72 KB

button-disabled-headref

Disabled Button

A disabled button is unusable and un-clickable.
The disabled prop of NativeBase Button is of type boolean. When present, it specifies that the button should be disabled. The disabled prop can be set to keep a user from clicking on the button until some other conditions are met (like selecting a checkbox, etc.). Then, a conditional code could remove the disabled value, and make the button usable.

Preview ios button-disabled-headref Preview android button-disabled-headref Syntax

import React, { Component } from 'react';
import { Container, Header, Content, Button, Text, Icon } from 'native-base';
export default class ButtonDisabledExample extends Component {
  render() {
    return (
      <Container>
        <Header />
        <Content>
          <Button disabled><Text>Default</Text></Button>
          <Button disabled bordered><Text>Bordered</Text></Button>
          <Button disabled rounded><Text>Rounded</Text></Button>
          <Button disabled large><Text>Large</Text></Button>
          <Button disabled iconRight>
            <Text>Icon Button</Text>
            <Icon name="home" />
          </Button>
          <Button disabled block><Text>Block</Text></Button>
          <Button disabled full><Text>Full</Text></Button>
        </Content>
      </Container>
    );
  }
}