Skip to content

Commit

Permalink
Merge pull request #1588 from hackforla/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
sydneywalcoff authored Sep 30, 2024
2 parents d453980 + f9ac1eb commit e563455
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions products/statement-generator/src/components/LinkAsText.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
import React from 'react';
import { makeStyles, createStyles, Link } from '@material-ui/core';

const useStyles = makeStyles(({ palette }) =>
const useStyles = makeStyles(() =>
createStyles({
linkAsText: {
color: palette.common.black,
color: '#25003F',
'&:visited': {
color: '#25003F', // Same color for visited links
},
'&:hover': {
color: '#25003F', // Same color on hover
},
},
})
);

export default function LinkAsText({ link }: any) {
interface LinkAsTextProps {
link: string;
label?: string;
}

export default function LinkAsText({ link, label }: LinkAsTextProps) {
const classes = useStyles();
return (
<>
Expand All @@ -19,8 +30,9 @@ export default function LinkAsText({ link }: any) {
className={classes.linkAsText}
href={link}
target="_blank"
rel="noopener noreferrer"
>
{link}
{label || link}
</Link>
&nbsp;
</>
Expand Down

0 comments on commit e563455

Please sign in to comment.