Skip to content
Snippets Groups Projects
Unverified Commit 752fdcee authored by Alexander Polyankin's avatar Alexander Polyankin Committed by GitHub
Browse files

Add a tooltip for the question's last edit date (#21862)

parent 51f36d4b
No related branches found
No related tags found
No related merge requests found
......@@ -5,8 +5,9 @@ import { t } from "ttag";
import moment from "moment";
import { getUser } from "metabase/selectors/user";
import { TextButton } from "metabase/components/Button.styled";
import Tooltip from "metabase/components/Tooltip";
import DateTime from "metabase/components/DateTime";
function mapStateToProps(state) {
return {
......@@ -46,12 +47,14 @@ function LastEditInfoLabel({ item, user, onClick, className }) {
editorId === user.id ? t`you` : formatEditorName(first_name, last_name);
return (
<TextButton
size="small"
className={className}
onClick={onClick}
data-testid="revision-history-button"
>{t`Edited ${time} by ${editor}`}</TextButton>
<Tooltip tooltip={<DateTime value={timestamp} />}>
<TextButton
size="small"
className={className}
onClick={onClick}
data-testid="revision-history-button"
>{t`Edited ${time} by ${editor}`}</TextButton>
</Tooltip>
);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment