mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Remove deprecated surface prop from IconButton (#49715)
* Chore: Remove deprecated `surface` prop from IconButton * Update component docs
This commit is contained in:
@@ -212,7 +212,7 @@ const AddPanelWidgetHandle: React.FC<AddPanelWidgetHandleProps> = ({ children, o
|
||||
<div className={cx(styles.headerRow, 'grid-drag-handle')}>
|
||||
{onBack && (
|
||||
<div className={styles.backButton}>
|
||||
<IconButton aria-label="Go back" name="arrow-left" onClick={onBack} surface="header" size="xl" />
|
||||
<IconButton aria-label="Go back" name="arrow-left" onClick={onBack} size="xl" />
|
||||
</div>
|
||||
)}
|
||||
{!onBack && (
|
||||
@@ -222,7 +222,7 @@ const AddPanelWidgetHandle: React.FC<AddPanelWidgetHandleProps> = ({ children, o
|
||||
)}
|
||||
{children && <span>{children}</span>}
|
||||
<div className="flex-grow-1" />
|
||||
<IconButton aria-label="Close 'Add Panel' widget" name="times" onClick={onCancel} surface="header" />
|
||||
<IconButton aria-label="Close 'Add Panel' widget" name="times" onClick={onCancel} />
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -57,23 +57,11 @@ export const AnnotationSettingsList: React.FC<Props> = ({ dashboard, onNew, onEd
|
||||
{dataSourceSrv.getInstanceSettings(annotation.datasource)?.name || annotation.datasource?.uid}
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
{idx !== 0 && (
|
||||
<IconButton
|
||||
surface="header"
|
||||
name="arrow-up"
|
||||
aria-label="arrow-up"
|
||||
onClick={() => onMove(idx, -1)}
|
||||
/>
|
||||
)}
|
||||
{idx !== 0 && <IconButton name="arrow-up" aria-label="arrow-up" onClick={() => onMove(idx, -1)} />}
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
{dashboard.annotations.list.length > 1 && idx !== dashboard.annotations.list.length - 1 ? (
|
||||
<IconButton
|
||||
surface="header"
|
||||
name="arrow-down"
|
||||
aria-label="arrow-down"
|
||||
onClick={() => onMove(idx, 1)}
|
||||
/>
|
||||
<IconButton name="arrow-down" aria-label="arrow-down" onClick={() => onMove(idx, 1)} />
|
||||
) : null}
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
|
||||
@@ -73,27 +73,15 @@ export const LinkSettingsList: React.FC<LinkSettingsListProps> = ({ dashboard, o
|
||||
</HorizontalGroup>
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
{idx !== 0 && (
|
||||
<IconButton
|
||||
surface="header"
|
||||
name="arrow-up"
|
||||
aria-label="arrow-up"
|
||||
onClick={() => moveLink(idx, -1)}
|
||||
/>
|
||||
)}
|
||||
{idx !== 0 && <IconButton name="arrow-up" aria-label="arrow-up" onClick={() => moveLink(idx, -1)} />}
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
{links.length > 1 && idx !== links.length - 1 ? (
|
||||
<IconButton
|
||||
surface="header"
|
||||
name="arrow-down"
|
||||
aria-label="arrow-down"
|
||||
onClick={() => moveLink(idx, 1)}
|
||||
/>
|
||||
<IconButton name="arrow-down" aria-label="arrow-down" onClick={() => moveLink(idx, 1)} />
|
||||
) : null}
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
<IconButton surface="header" aria-label="copy" name="copy" onClick={() => duplicateLink(link, idx)} />
|
||||
<IconButton aria-label="copy" name="copy" onClick={() => duplicateLink(link, idx)} />
|
||||
</td>
|
||||
<td style={{ width: '1%' }}>
|
||||
<DeleteButton
|
||||
|
||||
@@ -233,7 +233,6 @@ class UnThemedTransformationsEditor extends React.PureComponent<TransformationsE
|
||||
{filtered.length} / {xforms.length}
|
||||
<IconButton
|
||||
name="times"
|
||||
surface="header"
|
||||
onClick={() => {
|
||||
this.setState({ search: '' });
|
||||
}}
|
||||
@@ -251,7 +250,6 @@ class UnThemedTransformationsEditor extends React.PureComponent<TransformationsE
|
||||
suffix = (
|
||||
<IconButton
|
||||
name="times"
|
||||
surface="header"
|
||||
onClick={() => {
|
||||
this.setState({ showPicker: false });
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user