mirror of
https://github.com/grafana/grafana.git
synced 2025-02-13 00:55:47 -06:00
* First stab at new page layouts behind feature toggle * Simplifying PageHeader * Progress on a new model that can more easily support new and old page layouts * Progress * rename folder * Progress * Minor change * fixes * Fixing tests * Make breadcrumbs work * Add tests for old Page component * Adding tests for new Page component and behavior * fixing page header test * Fixed test * Moving user profile routes to navId * PageLayouts: Updates dashboards routes with navId * added missing navId * AppChrome outside route * Renaming folder * Minor fix * Updated * Fixing StoragePage * Updated * Updating translation ids * Updated snapshot * update nav translation ids (yes this is confusing) Co-authored-by: Ashley Harrison <ashley.harrison@grafana.com> Co-authored-by: joshhunt <josh@trtr.co>
23 lines
853 B
TypeScript
23 lines
853 B
TypeScript
import React, { useState } from 'react';
|
|
|
|
import { Page } from 'app/core/components/Page/Page';
|
|
|
|
import { LibraryPanelsSearch } from './components/LibraryPanelsSearch/LibraryPanelsSearch';
|
|
import { OpenLibraryPanelModal } from './components/OpenLibraryPanelModal/OpenLibraryPanelModal';
|
|
import { LibraryElementDTO } from './types';
|
|
|
|
export const LibraryPanelsPage = () => {
|
|
const [selected, setSelected] = useState<LibraryElementDTO | undefined>(undefined);
|
|
|
|
return (
|
|
<Page navId="dashboards/library-panels">
|
|
<Page.Contents>
|
|
<LibraryPanelsSearch onClick={setSelected} showSecondaryActions showSort showPanelFilter showFolderFilter />
|
|
{selected ? <OpenLibraryPanelModal onDismiss={() => setSelected(undefined)} libraryPanel={selected} /> : null}
|
|
</Page.Contents>
|
|
</Page>
|
|
);
|
|
};
|
|
|
|
export default LibraryPanelsPage;
|