We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 81c070e commit 4e6a9c5Copy full SHA for 4e6a9c5
src/MyUrlField.js
@@ -1,8 +1,25 @@
1
import React from 'react';
2
+import { makeStyles } from '@material-ui/core/styles';
3
+import LaunchIcon from '@material-ui/icons/Launch';
4
-const MyUrlField = ({ record = {}, source }) =>
- <a href={record[source]}>
5
- {record[source]}
6
- </a>;
+const useStyles = makeStyles({
+ link: {
7
+ textDecoration: 'none',
8
+ },
9
+ icon: {
10
+ width: '0.5em',
11
+ paddingLeft: 2,
12
13
+});
14
+
15
+const MyUrlField = ({ record = {}, source }) => {
16
+ const classes = useStyles();
17
+ return (
18
+ <a href={record[source]} className={classes.link}>
19
+ {record[source]}
20
+ <LaunchIcon className={classes.icon} />
21
+ </a>
22
+ )
23
+};
24
25
export default MyUrlField;
0 commit comments