import React, { FC } from 'react'; import { HorizontalGroup, LinkButton } from '@grafana/ui'; export interface Props { folderId?: number; isEditor: boolean; canEdit?: boolean; } export const DashboardActions: FC = ({ folderId, isEditor, canEdit }) => { const actionUrl = (type: string) => { let url = `dashboard/${type}`; if (folderId) { url += `?folderId=${folderId}`; } return url; }; return (
{canEdit && New Dashboard} {!folderId && isEditor && New Folder} {canEdit && Import}
); };