forked from jeremybarbet/react-native-modalize
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
alwaysOpen
props to keep the modal visible
* Initial work * Fix watch scripts for examples * Transition on overlay * Fix watch script for RN * Add examples * Update docs * Fix post version script
- Loading branch information
1 parent
ed5d27a
commit dc1545b
Showing
17 changed files
with
304 additions
and
129 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import Modalize from 'react-native-modalize'; | ||
import faker from 'faker'; | ||
|
||
export class AlwaysOpen extends React.PureComponent { | ||
|
||
modal = React.createRef(); | ||
|
||
renderContent = () => ( | ||
<View style={s.content}> | ||
<Text style={s.content__subheading}>{'Introduction'.toUpperCase()}</Text> | ||
<Text style={s.content__heading}>Always open modal!</Text> | ||
<Text style={s.content__description}>{faker.lorem.paragraph()}</Text> | ||
</View> | ||
) | ||
|
||
render() { | ||
return ( | ||
<Modalize | ||
ref={this.modal} | ||
style={s.content__modal} | ||
alwaysOpen={85} | ||
handlePosition="inside" | ||
> | ||
{this.renderContent()} | ||
</Modalize> | ||
); | ||
} | ||
} | ||
|
||
const s = StyleSheet.create({ | ||
content: { | ||
padding: 20, | ||
}, | ||
|
||
content__modal: { | ||
shadowColor: '#000', | ||
shadowOffset: { width: 0, height: 6 }, | ||
shadowOpacity: 0.45, | ||
shadowRadius: 16, | ||
}, | ||
|
||
content__subheading: { | ||
marginBottom: 2, | ||
|
||
fontSize: 16, | ||
fontWeight: '600', | ||
color: '#ccc', | ||
}, | ||
|
||
content__heading: { | ||
fontSize: 24, | ||
fontWeight: '600', | ||
color: '#333', | ||
}, | ||
|
||
content__description: { | ||
paddingTop: 10, | ||
paddingBottom: 10, | ||
|
||
fontSize: 15, | ||
fontWeight: '200', | ||
lineHeight: 22, | ||
color: '#666', | ||
}, | ||
}); |
26 changes: 0 additions & 26 deletions
26
examples/react-native-navigation/src/components/footer/Footer.js
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
67 changes: 67 additions & 0 deletions
67
examples/react-native-navigation/src/screens/AlwaysOpen.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
import React from 'react'; | ||
import { StyleSheet, Text, View } from 'react-native'; | ||
import Modalize from 'react-native-modalize'; | ||
import faker from 'faker'; | ||
|
||
export class AlwaysOpen extends React.PureComponent { | ||
|
||
modal = React.createRef(); | ||
|
||
renderContent = () => ( | ||
<View style={s.content}> | ||
<Text style={s.content__subheading}>{'Introduction'.toUpperCase()}</Text> | ||
<Text style={s.content__heading}>Always open modal!</Text> | ||
<Text style={s.content__description}>{faker.lorem.paragraph()}</Text> | ||
</View> | ||
) | ||
|
||
render() { | ||
return ( | ||
<Modalize | ||
ref={this.modal} | ||
style={s.content__modal} | ||
alwaysOpen={85} | ||
handlePosition="inside" | ||
> | ||
{this.renderContent()} | ||
</Modalize> | ||
); | ||
} | ||
} | ||
|
||
const s = StyleSheet.create({ | ||
content: { | ||
padding: 20, | ||
}, | ||
|
||
content__modal: { | ||
shadowColor: '#000', | ||
shadowOffset: { width: 0, height: 6 }, | ||
shadowOpacity: 0.45, | ||
shadowRadius: 16, | ||
}, | ||
|
||
content__subheading: { | ||
marginBottom: 2, | ||
|
||
fontSize: 16, | ||
fontWeight: '600', | ||
color: '#ccc', | ||
}, | ||
|
||
content__heading: { | ||
fontSize: 24, | ||
fontWeight: '600', | ||
color: '#333', | ||
}, | ||
|
||
content__description: { | ||
paddingTop: 10, | ||
paddingBottom: 10, | ||
|
||
fontSize: 15, | ||
fontWeight: '200', | ||
lineHeight: 22, | ||
color: '#666', | ||
}, | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.