mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Alerting: Update design of rule details tab and add updated by (#99895)
This commit is contained in:
@@ -4,7 +4,7 @@ import * as React from 'react';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
|
||||
import { Trans } from '../../../src/utils/i18n';
|
||||
import { t } from '../../../src/utils/i18n';
|
||||
import { useStyles2 } from '../../themes';
|
||||
import { Button, ButtonProps } from '../Button';
|
||||
import { Icon } from '../Icon/Icon';
|
||||
@@ -60,11 +60,12 @@ export function ClipboardButton({
|
||||
}
|
||||
}, [getText, onClipboardCopy, onClipboardError]);
|
||||
|
||||
const copiedText = t('clipboard-button.inline-toast.success', 'Copied');
|
||||
return (
|
||||
<>
|
||||
{showCopySuccess && (
|
||||
<InlineToast placement="top" referenceElement={buttonRef.current}>
|
||||
<Trans i18nKey="clipboard-button.inline-toast.success">Copied</Trans>
|
||||
{copiedText}
|
||||
</InlineToast>
|
||||
)}
|
||||
|
||||
@@ -72,7 +73,7 @@ export function ClipboardButton({
|
||||
onClick={copyTextCallback}
|
||||
icon={icon}
|
||||
variant={showCopySuccess ? 'success' : variant}
|
||||
aria-label={showCopySuccess ? 'Copied' : undefined}
|
||||
aria-label={showCopySuccess ? copiedText : undefined}
|
||||
{...buttonProps}
|
||||
className={cx(styles.button, showCopySuccess && styles.successButton, buttonProps.className)}
|
||||
ref={buttonRef}
|
||||
|
||||
Reference in New Issue
Block a user