Skip to content
This repository has been archived by the owner on Jun 3, 2019. It is now read-only.

Commit

Permalink
Animations + some little improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ragozin-n committed Aug 29, 2017
1 parent 71d271f commit 73628dd
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/components/ListItem.js
Original file line number Diff line number Diff line change
@@ -1,16 +1,30 @@
import React, { Component } from 'react';
import { Text, TouchableWithoutFeedback, View } from 'react-native';
import {
Text,
TouchableWithoutFeedback,
View,
LayoutAnimation
} from 'react-native';
import { connect } from 'react-redux';
import { CardSection } from "./common";
import * as actions from '../actions';

class ListItem extends Component {

componentWillUpdate() {
LayoutAnimation.easeInEaseOut();
}

renderDesc() {
const { item, expanded } = this.props;

if (expanded) {
return (
<Text>{item.description}</Text>
<CardSection>
<Text style={{flex: 1}}>
{item.description}
</Text>
</CardSection>
);
}
}
Expand Down

0 comments on commit 73628dd

Please sign in to comment.