Skip to content

Latest commit

 

History

History
50 lines (46 loc) · 1.29 KB

Dialog.md

File metadata and controls

50 lines (46 loc) · 1.29 KB

Usage

...
import { Dialog, DialogDefaultActions } from 'react-native-material-ui';
...
render() {
    <View>
      <Dialog>
        <Dialog.Title><Text>Hello world</Text></Dialog.Title>
        <Dialog.Content>
          <Text>
            Lorem ipsum dolor sit amet, consectetur adipiscing elit.
          </Text>
        </Dialog.Content>
        <Dialog.Actions>
          <DialogDefaultActions
             actions={['cancel', 'ok']}
             /**
             * this will disable the button for "ok"
             */
             options={{ ok: { disabled: true } }}
             onActionPress={() => {}}
          />
        </Dialog.Actions>
      </Dialog>
    </View>
}

API

DialogDefaultActions/DialogStackedActions props

const propTypes = {
    actions: PropTypes.arrayOf(PropTypes.string).isRequired,
    options: PropTypes.shape({
      actionName: { disabled: PropTypes.bool }
    }),
    onActionPress: PropTypes.func.isRequired,
    style: PropTypes.shape({
        defaultActionsContainer: ViewPropTypes.style,
    }),
};
TODO
  • Add API to doc