Skip to content

Latest commit

 

History

History
51 lines (30 loc) · 913 Bytes

Modale.MD

File metadata and controls

51 lines (30 loc) · 913 Bytes

Loader

This loader take all the parent element size with an overlay, preventing the user to tap elements underneath it.

Methods

show()

Description

Show the modale.

hide()

Description

Hide the modale.

setStyle(style)

Description

Define some graphics into the component

Parameters

style : (object) Object containing styles. For now you can define theses:

  • overlay (View component)
  • box (View component)

setContent(component)

Description

Fill the modale content with your own component. Could be anything !

Parameters

component : (React Component) a React Component (really, your imagination is the limit here)

Full example

modale.setContent(<Text>I'm the modale content !</Text>);
modale.setStyle({box: {backgroundColor:'red'}});
modale.show();
    
setTimeout(() => {
    modale.hide();    
},3000)