fix copy to clipboard button tooltip

pull/501/head
slowbackspace 5 years ago
parent 56d2b8a0f7
commit 07db982493

@ -70,6 +70,11 @@ const ButtonCopy = styled(Button)`
margin-top: 10px; margin-top: 10px;
`; `;
const TooltipContainer = styled.div`
display: flex;
flex-direction: row;
`;
const Log = (props: Props) => { const Log = (props: Props) => {
if (!props.log.opened) return null; if (!props.log.opened) return null;
@ -93,15 +98,16 @@ const Log = (props: Props) => {
<ReactJson src={props.log.entries} /> <ReactJson src={props.log.entries} />
</LogWrapper> </LogWrapper>
{props.log.copied ? ( {props.log.copied ? (
<Tooltip <TooltipContainer>
defaultVisible <Tooltip
maxWidth={285} maxWidth={285}
placement="top" placement="top"
content={<FormattedMessage {...l10nMessages.TR_COPIED} />} content={<FormattedMessage {...l10nMessages.TR_COPIED} />}
afterVisibleChange={props.resetCopyState} onHidden={props.resetCopyState}
> >
{copyBtn} {copyBtn}
</Tooltip> </Tooltip>
</TooltipContainer>
) : ( ) : (
<CopyWrapper>{copyBtn}</CopyWrapper> <CopyWrapper>{copyBtn}</CopyWrapper>
)} )}

Loading…
Cancel
Save