Skip to content

Commit

Permalink
[F][C][QLink] add QLink, Link wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Fibii committed Oct 27, 2020
1 parent 435084e commit e113aa4
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions frontend/src/components/QLink/QLink.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Typography from '@material-ui/core/Typography'
import React from 'react'
import { Link } from 'react-router-dom'
import { makeStyles } from '@material-ui/core/styles'

const useStyles = makeStyles(() => ({
link: {
textDecoration: 'none',
outline: 'none',
'&:visited': {
color: 'inherit',
},
},
}))

const QLink = ({ to, children, testId }) => {
const classes = useStyles()
return (
<Link to={to} variant="body2" className={classes.link} data-testid={testId}>
<Typography variant="body2">{ children }</Typography>
</Link>
)
}

export default QLink

0 comments on commit e113aa4

Please sign in to comment.