Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

space should based on certain type on and not freetext #240

Merged
merged 5 commits into from
Mar 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "galio-framework",
"main": "src/index.js",
"version": "0.7.0",
"version": "0.7.1",
"files": [
"src/"
],
Expand Down
2 changes: 1 addition & 1 deletion src/Block.js
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ Block.propTypes = {
card: PropTypes.bool,
left: PropTypes.bool,
shadow: PropTypes.bool,
space: PropTypes.string,
space: PropTypes.oneOf(['between', 'around', 'evenly' ]),
fluid: PropTypes.bool,
height: PropTypes.number,
width: PropTypes.number,
Expand Down
8 changes: 6 additions & 2 deletions src/Toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ class Toast extends Component {
]),
round: PropTypes.bool,
style: ViewPropTypes.style,
textStyle: ViewPropTypes.style,
textStyle: PropTypes.object,
styles: PropTypes.any,
theme: PropTypes.any,
useNativeDriver: PropTypes.bool
};

static defaultProps = {
Expand All @@ -37,6 +38,7 @@ class Toast extends Component {
textStyle: null,
styles: {},
theme: GalioTheme,
useNativeDriver: true
};

state = {
Expand All @@ -49,7 +51,7 @@ class Toast extends Component {
visibilityTimeout;

componentDidUpdate(prevProps) {
const { isShow, fadeInDuration, fadeOutDuration } = this.props;
const { isShow, fadeInDuration, fadeOutDuration, useNativeDriver } = this.props;
const { isShow: prevIsShow } = prevProps;
const { fadeAnim } = this.state;

Expand All @@ -59,13 +61,15 @@ class Toast extends Component {
this.animation = Animated.timing(fadeAnim, {
toValue: 1,
duration: fadeInDuration,
useNativeDriver,
}).start();
}

if (prevIsShow && !isShow) {
this.animation = Animated.timing(fadeAnim, {
toValue: 0,
duration: fadeOutDuration,
useNativeDriver,
}).start();

this.visibilityTimeout = setTimeout(() => {
Expand Down