react-native-custom-action-sheet icon indicating copy to clipboard operation
react-native-custom-action-sheet copied to clipboard

could you please write some example

Open pgmemk opened this issue 9 years ago • 12 comments

The component looks great in your recorded example. I was on the lookout for something like that for a while to hide DatePicker :)

I tried to use it in our app and struggling with 2 issues:

  1. background is lost somehow (see image below)
  2. I have a long form and it is not scrolling when I use this component

It would be great if you could write a simple example of how you use it. I am also using your FloatLabelTextInput as you can see in the snapshot. Thank you very much!!!

image

pgmemk avatar Dec 20 '15 00:12 pgmemk

  1. The background is up to you. Just add white background or anything else you need. (styles.datePickerContainer in my example in the readme)
  2. When the component is on, scrolling should be disabled. You will also see a transparent dark overlay (which for some reason I don't see in your image).

Glad you like my components!

Let me know if it works or if you have more questions.

eyaleizenberg avatar Dec 20 '15 14:12 eyaleizenberg

I have my simple example in https://github.com/pgmemk/TTI/blob/master/index.ios.js Could you please tell me what's wrong with it? It lost the overlay too for some reason

pgmemk avatar Dec 21 '15 00:12 pgmemk

https://github.com/pgmemk/TTI/blob/master/index.ios.js#L42

Give the View I highlighted backgroundColor: 'white'

About the overlay, which RN are you using?

eyaleizenberg avatar Dec 21 '15 11:12 eyaleizenberg

In the sample "react-native": "facebook/react-native#v0.14.2", and in the app
"react-native": "facebook/react-native#v0.16.0", none of them shows overlay

pgmemk avatar Dec 22 '15 04:12 pgmemk

@pgmemk i'm having the same issue

yamill avatar Dec 22 '15 16:12 yamill

@pgmemk looks like i resolved mine by making sure that backgroundColor is added.

Like so:

<CustomActionSheet modalVisible={this.state.birthdateVisible} onCancel={this.handleDismiss}>
      <View style={{backgroundColor: 'white', marginBottom: 10, borderRadius: 5}}>
            <DatePickerIOS
               date={this.state.birthdate}
               mode="date"
               timeZoneOffsetInMinutes={this.state.timeZoneOffsetInHours * 60}
               onDateChange={this.onDateChange}
             />
     </View>
</CustomActionSheet>

yamill avatar Dec 22 '15 16:12 yamill

@yamill That's exactly what I meant.

I think I have the solution for the overlay, I will (hopefully) deploy the fix today.

eyaleizenberg avatar Dec 23 '15 05:12 eyaleizenberg

Awesome thanks

yamill avatar Dec 23 '15 12:12 yamill

thank you

pgmemk avatar Dec 24 '15 03:12 pgmemk

Hi @pgmemk I believe it's fixed in v 0.0.8, can you please confirm?

eyaleizenberg avatar Apr 02 '16 07:04 eyaleizenberg

Having trouble getting a working example as well. Set styles.datePickerContainer to white, but there's no semi-transparent modal background.

braco avatar Apr 28 '16 18:04 braco

Awesome Work! Thanks. really good job :)

waleedarshad-vf avatar Aug 16 '16 11:08 waleedarshad-vf