diff --git a/app/components/simple-voting/OrderingFilter.js b/app/components/simple-voting/OrderingFilter.js new file mode 100644 index 0000000..9d3c5d7 --- /dev/null +++ b/app/components/simple-voting/OrderingFilter.js @@ -0,0 +1,90 @@ +import React, { Fragment, PureComponent } from 'react'; +import PropTypes from 'prop-types'; +import { withStyles } from '@material-ui/core/styles'; +import Button from '@material-ui/core/Button'; +import Dialog from '@material-ui/core/Dialog'; +import ListItemText from '@material-ui/core/ListItemText'; +import ListItem from '@material-ui/core/ListItem'; +import List from '@material-ui/core/List'; +import Divider from '@material-ui/core/Divider'; +import AppBar from '@material-ui/core/AppBar'; +import Toolbar from '@material-ui/core/Toolbar'; +import IconButton from '@material-ui/core/IconButton'; +import Typography from '@material-ui/core/Typography'; +import CloseIcon from '@material-ui/icons/Close'; +import Slide from '@material-ui/core/Slide'; + +const options = ['Most Votes', 'Most Voters', 'Newest Added', 'Ending Soonest', ] +const styles = { + appBar: { + position: 'relative', + }, + flex: { + flex: 1, + }, +}; + +function Transition(props) { + return ; +} + +const ListButton = ({ name }) => ( + + + + + + +) + +class OrderingDialog extends PureComponent { + state = { + open: false, + }; + + handleClickOpen = () => { + this.setState({ open: true }); + }; + + handleClose = () => { + this.setState({ open: false }); + }; + + render() { + const { classes } = this.props; + return ( +
+ + + + + + + + + close + + + + + + {options.map((name, i) => )} + + +
+ ); + } +} + +OrderingDialog.propTypes = { + classes: PropTypes.object.isRequired, +}; + +export default withStyles(styles)(OrderingDialog); diff --git a/app/components/standard/AppBar.js b/app/components/standard/AppBar.js index b6aaa27..687621b 100644 --- a/app/components/standard/AppBar.js +++ b/app/components/standard/AppBar.js @@ -8,6 +8,7 @@ import Button from '@material-ui/core/Button'; import IconButton from '@material-ui/core/IconButton'; import MenuIcon from '@material-ui/icons/Menu'; import Hidden from '@material-ui/core/Hidden'; +import OrderingFilter from '../simple-voting/OrderingFilter'; import { VotingContext } from '../../context'; const hasSnt = snt => Number(snt.balance) > 0; @@ -38,7 +39,7 @@ function ButtonAppBar(props) {
- + @@ -46,7 +47,8 @@ function ButtonAppBar(props) { What should we build next? - {snt && } + {snt && } +