addjusting positioning of tooltip elements

This commit is contained in:
Alex Windett 2017-01-25 17:36:56 +00:00
parent 4ac20bac73
commit 0c8971e372
3 changed files with 12 additions and 7 deletions

View File

@ -24,6 +24,8 @@ const borderSide = props => props.toggled
const StyledWrapper = styled.div`
position: relative;
display: inline-block;
min-width: ${remcalc(130)};
&:after {
border-left: ${remcalc(5)} solid transparent;
@ -31,8 +33,8 @@ const StyledWrapper = styled.div`
border-${borderSide}: ${remcalc(5)} solid black;
${pseudoEl({
top: '50%',
right: remcalc(10)
top: '40%',
right: remcalc(-10)
})}
}
`;
@ -58,7 +60,7 @@ const PersonRole = (props) => {
orgIndex
} = props;
const toggled = toggledID;
const toggled = toggledID === person.uuid;
const handleClick = () => handleRoleTooltip(person.uuid);
const handleOptionSelect = (updatedMember) =>
handleMemberUpdate(updatedMember);

View File

@ -24,6 +24,8 @@ const borderSide = props => props.toggled
const StyledWrapper = styled.div`
position: relative;
display: inline-block;
min-width: ${remcalc(130)};
&:after {
border-left: ${remcalc(5)} solid transparent;
@ -31,8 +33,8 @@ const StyledWrapper = styled.div`
border-${borderSide}: ${remcalc(5)} solid black;
${pseudoEl({
top: '50%',
right: remcalc(10)
top: '40%',
right: remcalc(-10)
})}
}
`;
@ -58,7 +60,7 @@ const PersonStatus = (props) => {
orgIndex
} = props;
const toggled = toggledID;
const toggled = toggledID === person.uuid;
const handleClick = () => handleStatusTooltip(person.uuid);
const handleOptionSelect = (updatedMember) =>
handleMemberUpdate(updatedMember);

View File

@ -5,7 +5,8 @@ const Tooltip = require('@ui/components/tooltip');
const tooltipStyle = {
position: 'absolute',
top: '30px',
zIndex: 1
zIndex: 1,
right: '-36px',
};
const arrowPosition = {