Search: replace cog icon (#27440)

This commit is contained in:
Alex Khomenko 2020-09-08 12:04:40 +03:00 committed by GitHub
parent 09c9571462
commit 6fabfee097
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 7 deletions

View File

@ -115,7 +115,8 @@ export type IconName =
| 'line-alt'
| 'sort-amount-down'
| 'cloud'
| 'draggabledots';
| 'draggabledots'
| 'folder-upload';
export const getAvailableIcons = (): IconName[] => [
'fa fa-spinner',
@ -230,4 +231,5 @@ export const getAvailableIcons = (): IconName[] => [
'sort-amount-down',
'cloud',
'draggabledots',
'folder-upload',
];

View File

@ -48,12 +48,15 @@ export const SectionHeader: FC<SectionHeaderProps> = ({
<Icon name={getSectionIcon(section)} />
</div>
<span className={styles.text}>{section.title}</span>
{section.url && (
<a href={section.url} className={styles.link}>
<Icon name="cog" />
</a>
)}
<div className={styles.text}>
{section.title}
{section.url && (
<a href={section.url} className={styles.link}>
<span className={styles.separator}>|</span> <Icon name="folder-upload" /> Go to folder
</a>
)}
</div>
{section.itemsFetching ? <Spinner /> : <Icon name={section.expanded ? 'angle-down' : 'angle-right'} />}
</div>
);
@ -97,5 +100,8 @@ const getSectionHeaderStyles = stylesFactory((theme: GrafanaTheme, selected = fa
opacity: 0;
transition: opacity 150ms ease-in-out;
`,
separator: css`
margin-right: 6px;
`,
};
});