Skip to content

Commit

Permalink
[wip] panel info icon on immediate right, toggle on far right
Browse files Browse the repository at this point in the history
  • Loading branch information
victorlin committed Oct 9, 2023
1 parent 8882e72 commit 80063fa
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 16 deletions.
26 changes: 13 additions & 13 deletions src/components/controls/annotatedHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,20 @@ type Props = {
export const AnnotatedHeader = ({toggle=undefined, title, tooltip, mobile}: Props) => {
return (
<HeaderContainer>
<span>
{toggle && <span>{toggle}</span>}
<div>
<HeaderTitle>{title}</HeaderTitle>
</span>
{tooltip && !mobile && (
<>
<HeaderIconContainer data-tip data-for={title}>
<FaInfoCircle/>
</HeaderIconContainer>
<StyledTooltip place="bottom" type="dark" effect="solid" id={title}>
{tooltip}
</StyledTooltip>
</>
)}
{tooltip && !mobile && (
<>
<HeaderIconContainer data-tip data-for={title}>
<FaInfoCircle />
</HeaderIconContainer>
<StyledTooltip place="bottom" type="dark" effect="solid" id={title}>
{tooltip}
</StyledTooltip>
</>
)}
</div>
{toggle !== undefined && toggle}
</HeaderContainer>
);
};
Expand Down
1 change: 0 additions & 1 deletion src/components/controls/panel-toggle.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ const PanelToggle = ({ panel, on }: Props) => {
on={on}
callback={() => dispatch(togglePanelDisplay(panel))}
label=""
style={{display: "inline"}}
/>
);
};
Expand Down
3 changes: 1 addition & 2 deletions src/components/controls/styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ export const HeaderTitle = styled.span`
`;

export const HeaderIconContainer = styled.span`
padding-top: 4px;
padding-right: 3px;
padding-left: 6px;
cursor: help;
color: #888;
`;
Expand Down

0 comments on commit 80063fa

Please sign in to comment.