Commit cb72242d by Giordano Ricci Committed by GitHub

Chore: use new Input component in Share Modal (#28269)

* Chore: Add dashboard-alt icon

* Chore: use new Input component in Share Modal

* Update packages/grafana-ui/src/types/icon.ts

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Update public/app/features/dashboard/components/ShareModal/ShareLink.tsx

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

* Update packages/grafana-ui/src/types/icon.ts

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>

Co-authored-by: Ivana Huckova <30407135+ivanahuckova@users.noreply.github.com>
parent c3336e6e
import React, { PureComponent } from 'react';
import { selectors as e2eSelectors } from '@grafana/e2e-selectors';
import { LegacyForms, ClipboardButton, Icon, InfoBox } from '@grafana/ui';
import { LegacyForms, ClipboardButton, Icon, InfoBox, Input } from '@grafana/ui';
const { Select, Switch } = LegacyForms;
import { SelectableValue, PanelModel, AppEvents } from '@grafana/data';
import { getBackendSrv } from '@grafana/runtime';
......@@ -136,12 +136,19 @@ export class ShareLink extends PureComponent<Props, State> {
<div className="gf-form-group">
<div className="gf-form-inline">
<div className="gf-form gf-form--grow">
<input type="text" className="gf-form-input" defaultValue={shareUrl} />
</div>
<div className="gf-form">
<ClipboardButton variant="primary" getText={this.getShareUrl} onClipboardCopy={this.onShareUrlCopy}>
Copy
</ClipboardButton>
<Input
value={shareUrl}
readOnly
addonAfter={
<ClipboardButton
variant="primary"
getText={this.getShareUrl}
onClipboardCopy={this.onShareUrlCopy}
>
<Icon name="copy" /> Copy
</ClipboardButton>
}
/>
</div>
</div>
</div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment