add transistion for AddPoll

This commit is contained in:
Barry Gitarts 2018-06-28 11:03:59 -04:00
parent 2b0b834827
commit 037c976826
1 changed files with 4 additions and 1 deletions

View File

@ -5,6 +5,7 @@ import AppBar from './standard/AppBar';
import AddPoll from './simple-voting/AddPoll';
import PollsList from './simple-voting/PollsList';
import StatusLogo from '../ui/components/StatusLogo';
import Collapse from '@material-ui/core/Collapse';
class Voting extends PureComponent {
state = { addPoll: false };
@ -20,7 +21,9 @@ class Voting extends PureComponent {
<div style={{ margin: '30px', textAlign: 'center' }}>
<img src="images/logo.png" width="200" />
</div>
{addPoll && <AddPoll togglePoll={togglePoll} />}
<Collapse in={addPoll}>
<AddPoll togglePoll={togglePoll} />
</Collapse>
{rawPolls && <PollsList rawPolls={rawPolls} />}
</Fragment>
)