@material-ui/icons#Loop JavaScript Examples

The following examples show how to use @material-ui/icons#Loop. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: MainToolBar.js    From FireShort with MIT License 6 votes vote down vote up
export default function MainToolBar(props) {
    const classes = useStyles();
    
    const filter = useSelector((state) => state.filter)
    const dispatch = useDispatch();

    const changeHandler = (value) => {
        dispatch(setTextFilter(value));
    }

    return (
        <Container maxWidth="md">
            <Card className={classes.toolBarRoot} style={{ display: "grid", gridTemplateColumns: "3fr 1fr" }}>
                <TextField variant="outlined" color="default" value={filter.text} placeholder="Search links" onChange={(e) => changeHandler(e.target.value)} style={{ boxShadow: "unset !important", justifyContent: "flex-start", display: "flex" }} />
                <ButtonGroup variant="outlined" color="default" style={{ boxShadow: "unset !important", justifyContent: "flex-end", display: "flex" }}>
                    <Button onClick={props.refresh}>
                        <Loop />
                    </Button>
                    <Button onClick={() => props.updateViewMode("module")} disabled={props.state.viewMode === "module"}>
                        <ViewModuleIcon />
                    </Button>
                    <Button onClick={() => props.updateViewMode("list")} disabled={props.state.viewMode === "list"}>
                        <ViewListIcon />
                    </Button>
                </ButtonGroup>
            </Card>
        </Container>
    );
}