From d641f9153e9458d7e27657d2e2c3ea1eb3ead08f Mon Sep 17 00:00:00 2001 From: Alex Khomenko Date: Thu, 16 Nov 2023 07:23:22 +0200 Subject: [PATCH] Grafana/ui: Move Grid out of unstable (#78220) * Grafana/ui: move Grid out of unstable * Update docs --- packages/grafana-ui/src/components/Layout/Grid/Grid.mdx | 2 +- .../Layout/Grid/{Grid.internal.story.tsx => Grid.story.tsx} | 0 packages/grafana-ui/src/components/index.ts | 1 + packages/grafana-ui/src/unstable.ts | 2 -- .../connections/tabs/ConnectData/CardGrid/CardGrid.tsx | 3 +-- public/app/features/plugins/admin/components/PluginList.tsx | 2 +- 6 files changed, 4 insertions(+), 6 deletions(-) rename packages/grafana-ui/src/components/Layout/Grid/{Grid.internal.story.tsx => Grid.story.tsx} (100%) diff --git a/packages/grafana-ui/src/components/Layout/Grid/Grid.mdx b/packages/grafana-ui/src/components/Layout/Grid/Grid.mdx index 7dd7f95f630..2b34c45e2b7 100644 --- a/packages/grafana-ui/src/components/Layout/Grid/Grid.mdx +++ b/packages/grafana-ui/src/components/Layout/Grid/Grid.mdx @@ -5,7 +5,7 @@ import { Grid } from './Grid'; # Grid -The `Grid` component allows for the organized layout and alignment of content into a grid-based structure. +The Grid component is a layout component that allows you to create a grid of columns and rows to organize content and elements. It is a wrapper around the [CSS Grid](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_Grid_Layout) specification. ## Usage diff --git a/packages/grafana-ui/src/components/Layout/Grid/Grid.internal.story.tsx b/packages/grafana-ui/src/components/Layout/Grid/Grid.story.tsx similarity index 100% rename from packages/grafana-ui/src/components/Layout/Grid/Grid.internal.story.tsx rename to packages/grafana-ui/src/components/Layout/Grid/Grid.story.tsx diff --git a/packages/grafana-ui/src/components/index.ts b/packages/grafana-ui/src/components/index.ts index e4240c1daf2..ff0df00871d 100644 --- a/packages/grafana-ui/src/components/index.ts +++ b/packages/grafana-ui/src/components/index.ts @@ -212,6 +212,7 @@ export { TextLink } from './Link/TextLink'; export { Text } from './Text/Text'; export { Box } from './Layout/Box/Box'; export { Stack } from './Layout/Stack/Stack'; +export { Grid } from './Layout/Grid/Grid'; export { Label } from './Forms/Label'; export { Field, type FieldProps } from './Forms/Field'; diff --git a/packages/grafana-ui/src/unstable.ts b/packages/grafana-ui/src/unstable.ts index 2e08df72642..106197389da 100644 --- a/packages/grafana-ui/src/unstable.ts +++ b/packages/grafana-ui/src/unstable.ts @@ -8,5 +8,3 @@ * Once mature, they will be moved to the main export, be available to plugins, and * be subject to the standard policies */ - -export { Grid } from './components/Layout/Grid/Grid'; diff --git a/public/app/features/connections/tabs/ConnectData/CardGrid/CardGrid.tsx b/public/app/features/connections/tabs/ConnectData/CardGrid/CardGrid.tsx index 211cb81e4ac..23f45f749b9 100644 --- a/public/app/features/connections/tabs/ConnectData/CardGrid/CardGrid.tsx +++ b/public/app/features/connections/tabs/ConnectData/CardGrid/CardGrid.tsx @@ -2,8 +2,7 @@ import { css } from '@emotion/css'; import React from 'react'; import { GrafanaTheme2 } from '@grafana/data'; -import { Card, useStyles2 } from '@grafana/ui'; -import { Grid } from '@grafana/ui/src/unstable'; +import { Card, Grid, useStyles2 } from '@grafana/ui'; import { PluginAngularBadge } from 'app/features/plugins/admin/components/Badges'; const getStyles = (theme: GrafanaTheme2) => ({ diff --git a/public/app/features/plugins/admin/components/PluginList.tsx b/public/app/features/plugins/admin/components/PluginList.tsx index 431882c4b91..428b2e2fffe 100644 --- a/public/app/features/plugins/admin/components/PluginList.tsx +++ b/public/app/features/plugins/admin/components/PluginList.tsx @@ -2,7 +2,7 @@ import React from 'react'; import { useLocation } from 'react-router-dom'; import { config } from '@grafana/runtime'; -import { Grid } from '@grafana/ui/src/unstable'; +import { Grid } from '@grafana/ui'; import { CatalogPlugin, PluginListDisplayMode } from '../types';