Improve visility of hevering URL
- Add top and bottom padding - Add border lines - Truncate long URL using ellipsis
This commit is contained in:
@@ -1,25 +1,28 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
|
|
||||||
const divStyle = {
|
const style = {
|
||||||
|
color: 'gray',
|
||||||
backgroundColor: 'whitesmoke',
|
backgroundColor: 'whitesmoke',
|
||||||
|
maxWidth: '95%',
|
||||||
|
whiteSpace: 'nowrap',
|
||||||
|
overflow: 'hidden',
|
||||||
|
textOverflow: 'ellipsis',
|
||||||
position: 'absolute',
|
position: 'absolute',
|
||||||
bottom: 0,
|
bottom: 0,
|
||||||
paddingLeft: 4,
|
paddingLeft: 4,
|
||||||
paddingRight: 16,
|
paddingRight: 16,
|
||||||
borderTopRightRadius: 4
|
paddingTop: 2,
|
||||||
};
|
paddingBottom: 2,
|
||||||
|
borderTopRightRadius: 4,
|
||||||
const spanStyle = {
|
borderTop: 'solid thin lightgray',
|
||||||
color: 'gray'
|
borderRight: 'solid thin lightgray'
|
||||||
};
|
};
|
||||||
|
|
||||||
class HoveringURL extends React.Component {
|
class HoveringURL extends React.Component {
|
||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<div style={divStyle}>
|
<div style={style}>
|
||||||
<span style={spanStyle}>
|
{this.props.targetURL}
|
||||||
{this.props.targetURL}
|
|
||||||
</span>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user