mirror of
https://github.com/grafana/grafana.git
synced 2025-08-02 11:31:35 +08:00

* Added labels * App page fixes * Switch to switch * wip * Updates * I am stuck * Minor tweak * This props interface could work * removed change * use new page extensions in plugin details page * add link separator, fix action button spacing * some renaming * Move PageInfo into it's own folder + add tests * add support for new props in old page header * remove PluginDetailsHeader as it's no longer used * Fix unit tests * fix some badge alignments * center align actions * badge alignment + only show downloads for community/commercial plugins * better link alignment * conditionally render description * move install control warnings to below subtitle + refactor Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
25 lines
668 B
TypeScript
25 lines
668 B
TypeScript
import React from 'react';
|
|
|
|
import { PageInfoItem } from '../../../../core/components/Page/types';
|
|
import { PluginActions } from '../components/PluginActions';
|
|
import { PluginSubtitle } from '../components/PluginSubtitle';
|
|
import { CatalogPlugin } from '../types';
|
|
|
|
import { usePluginInfo } from './usePluginInfo';
|
|
|
|
type ReturnType = {
|
|
actions: React.ReactNode;
|
|
info: PageInfoItem[];
|
|
subtitle: React.ReactNode;
|
|
};
|
|
|
|
export const usePluginPageExtensions = (plugin?: CatalogPlugin): ReturnType => {
|
|
const info = usePluginInfo(plugin);
|
|
|
|
return {
|
|
actions: <PluginActions plugin={plugin} />,
|
|
info,
|
|
subtitle: <PluginSubtitle plugin={plugin} />,
|
|
};
|
|
};
|