1
0
mirror of https://github.com/uetchy/namae.git synced 2025-03-17 04:30:31 +09:00

fix: tooltip position

This commit is contained in:
uetchy 2020-02-08 19:17:02 +09:00
parent c75d523f86
commit 71b74d4529

View File

@ -198,13 +198,13 @@ export const Result: React.FC<{
? COLORS.available
: COLORS.unavailable;
return (
<Tooltip
title={message}
position="bottom"
arrow={true}
animation="shift"
duration="200">
<ResultContainer>
<ResultContainer>
<Tooltip
title={message}
position="bottom"
arrow={true}
animation="shift"
duration="200">
<ResultItem color={itemColor}>
<ResultIcon>{icon}</ResultIcon>
<ResultName>
@ -220,8 +220,8 @@ export const Result: React.FC<{
</AvailableIcon>
) : null}
</ResultItem>
</ResultContainer>
</Tooltip>
</Tooltip>
</ResultContainer>
);
};
@ -256,23 +256,23 @@ class ErrorBoundary extends React.Component<
render() {
if (this.state.hasError) {
return (
<Tooltip
title={`${this.state.message}${
this.state.eventId ? ` (${this.state.eventId})` : ''
}`}
position="bottom"
arrow={true}
animation="shift"
duration="200">
<ResultContainer>
<ResultContainer>
<Tooltip
title={`${this.state.message}${
this.state.eventId ? ` (${this.state.eventId})` : ''
}`}
position="bottom"
arrow={true}
animation="shift"
duration="200">
<ResultItem color={COLORS.error}>
<ResultIcon>
<GoInfo />
</ResultIcon>
<ResultName>Error</ResultName>
</ResultItem>
</ResultContainer>
</Tooltip>
</Tooltip>
</ResultContainer>
);
}
return this.props.children;
@ -340,6 +340,8 @@ const Button = styled.div`
`;
const ResultContainer = styled.div`
display: flex;
align-items: center;
padding: 4px 0;
`;