Commit e6e5b14e authored by fmerg's avatar fmerg

Factor out styles

parent f3092038
Pipeline #15391 passed with stage
in 1 minute and 29 seconds
......@@ -6,15 +6,22 @@ const React = require('react');
const { Link } = require('react-router-dom');
const { Tooltip } = require('@material-ui/core')
const popupStyle = {
fontSize: '14px',
};
const textStyle = {
fontWeight: 'bold',
};
function get_pathname(reference) {
return { pathname: TERMS_DIR + reference };
}
const Term = ({children, reference, popup}) => {
return (
<Tooltip title={<span style={{fontSize: '14px'}}>{popup}</span>} arrow={true}>
<Tooltip title={<span style={popupStyle}>{popup}</span>} arrow={true}>
<Link to={ get_pathname(reference) }>
<span style={{fontWeight: 'bold'}} >{children}</span>
<span style={textStyle}>{children}</span>
</Link>
</Tooltip>
);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment