fix: resolve linter errors in ShareLinkTab
- Add noMargin prop to Field components to remove built-in margins - Replace deprecated gf-form with TextLink component from @grafana/ui
This commit is contained in:
@@ -2141,11 +2141,6 @@
|
||||
"count": 1
|
||||
}
|
||||
},
|
||||
"public/app/features/dashboard-scene/sharing/ShareLinkTab.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 4
|
||||
}
|
||||
},
|
||||
"public/app/features/dashboard-scene/sharing/ShareSnapshotTab.tsx": {
|
||||
"no-restricted-syntax": {
|
||||
"count": 3
|
||||
|
||||
@@ -184,15 +184,15 @@ function ShareLinkTabRenderer({ model }: SceneComponentProps<ShareLinkTab>) {
|
||||
</Trans>
|
||||
</p>
|
||||
<FieldSet>
|
||||
<Field label={lockTimeRangeLabel} description={isRelativeTime ? lockTimeRangeDescription : ''}>
|
||||
<Field noMargin label={lockTimeRangeLabel} description={isRelativeTime ? lockTimeRangeDescription : ''}>
|
||||
<Switch id="share-current-time-range" value={useLockedTime} onChange={model.onToggleLockedTime} />
|
||||
</Field>
|
||||
<ThemePicker selectedTheme={selectedTheme} onChange={model.onThemeChange} />
|
||||
<Field label={shortenURLTranslation}>
|
||||
<Field noMargin label={shortenURLTranslation}>
|
||||
<Switch id="share-shorten-url" value={useShortUrl} onChange={model.onUrlShorten} />
|
||||
</Field>
|
||||
|
||||
<Field label={linkURLTranslation}>
|
||||
<Field noMargin label={linkURLTranslation}>
|
||||
<Input
|
||||
id="link-url-input"
|
||||
value={shareUrl}
|
||||
@@ -209,12 +209,12 @@ function ShareLinkTabRenderer({ model }: SceneComponentProps<ShareLinkTab>) {
|
||||
{panel && config.rendererAvailable && (
|
||||
<>
|
||||
{isDashboardSaved && (
|
||||
<div className="gf-form">
|
||||
<a href={imageUrl} target="_blank" rel="noreferrer" aria-label={selectors.linkToRenderedImage}>
|
||||
<div>
|
||||
<TextLink href={imageUrl} external aria-label={selectors.linkToRenderedImage}>
|
||||
<Icon name="camera" />
|
||||
|
||||
<Trans i18nKey="share-modal.link.rendered-image">Direct link rendered image</Trans>
|
||||
</a>
|
||||
</TextLink>
|
||||
</div>
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user