Skip to content

RXReactNative/react-native-rxdialog-example

Repository files navigation

react-native-rxdialog-example

javaScript --> dialog [ Alert、toash、sheet ... ]

Getting started

$ npm install react-native-rxdialog --save

演示 web / show web https://rxreactnative.github.io/react-native-rxdialog-example/

default Support

srxboys srxboys

Support extensions ( rxdialog-example )

srxboys srxboys srxboys srxboys

    RXAlert.show(
      'DIY Alert title(标题)',
      'content (Can`t click on the background) \n内容 ---- 不可以 [ 点击背景]',
      [
        { text: 'confirm(确认)', style:{color: 'green', fontSize: 20} },
        { text: 'cancel(取消)', style:{color: 'brown', fontSize: 10}  }
      ], (index)=>{
        console.log('click index='+ index);
      },{
        // in Android , text多行的 fontSize 必须有 lineHeight
        contentTextStyle: { color: 'blue', fontSize: 16, lineHeight: 20}
      },{
        titleTextStyle: { color: 'orange', fontSize: 20 }
      }
    );



Support dialog pack ( rxdialog-example )

srxboys srxboys

# writing is more convenient
AlertUtil.activity(()=>{
  console.log('9 - right - click sure')
})

AlertUtil.action(()=>{
  console.log('10 - left - click sure')
})



web work

npm run web-nginx-dev
# or
npm run web-build-prod