UNPKG

@grafana/ui

Version:
1 lines 1.56 kB
{"version":3,"file":"PanelContainer.mjs","sources":["../../../../src/components/PanelContainer/PanelContainer.tsx"],"sourcesContent":["import { css, cx } from '@emotion/css';\nimport { DetailedHTMLProps, HTMLAttributes } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { useStyles2 } from '../../themes/ThemeContext';\n\ntype Props = DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>;\n\n// TODO: Reimplement this with Box\n/**\n * @deprecated Use Box instead\n *\n * https://developers.grafana.com/ui/latest/index.html?path=/docs/layout-deprecated-panelcontainer--docs\n */\nexport const PanelContainer = ({ children, className, ...props }: Props) => {\n const styles = useStyles2(getStyles);\n return (\n <div className={cx(styles, className)} {...props}>\n {children}\n </div>\n );\n};\n\nconst getStyles = (theme: GrafanaTheme2) =>\n css({\n backgroundColor: theme.components.panel.background,\n border: `1px solid ${theme.components.panel.borderColor}`,\n borderRadius: theme.shape.radius.default,\n });\n"],"names":[],"mappings":";;;;;AAeO,MAAM,iBAAiB,CAAC,EAAE,UAAU,SAAA,EAAW,GAAG,OAAM,KAAa;AAC1E,EAAA,MAAM,MAAA,GAAS,WAAW,SAAS,CAAA;AACnC,EAAA,uBACE,GAAA,CAAC,SAAI,SAAA,EAAW,EAAA,CAAG,QAAQ,SAAS,CAAA,EAAI,GAAG,KAAA,EACxC,QAAA,EACH,CAAA;AAEJ;AAEA,MAAM,SAAA,GAAY,CAAC,KAAA,KACjB,GAAA,CAAI;AAAA,EACF,eAAA,EAAiB,KAAA,CAAM,UAAA,CAAW,KAAA,CAAM,UAAA;AAAA,EACxC,MAAA,EAAQ,CAAA,UAAA,EAAa,KAAA,CAAM,UAAA,CAAW,MAAM,WAAW,CAAA,CAAA;AAAA,EACvD,YAAA,EAAc,KAAA,CAAM,KAAA,CAAM,MAAA,CAAO;AACnC,CAAC,CAAA;;;;"}