UNPKG

@grafana/ui

Version:
1 lines 1.3 kB
{"version":3,"file":"TabContent.mjs","sources":["../../../../src/components/Tabs/TabContent.tsx"],"sourcesContent":["import { css, cx } from '@emotion/css';\nimport { HTMLAttributes, ReactNode } from 'react';\n\nimport { GrafanaTheme2 } from '@grafana/data';\n\nimport { useStyles2 } from '../../themes/ThemeContext';\n\ninterface Props extends HTMLAttributes<HTMLDivElement> {\n children: ReactNode;\n}\n\n/**\n * https://developers.grafana.com/ui/latest/index.html?path=/docs/navigation-tabs--docs\n */\nexport const TabContent = ({ children, className, ...restProps }: Props) => {\n const styles = useStyles2(getTabContentStyle);\n\n return (\n <div {...restProps} className={cx(styles.tabContent, className)}>\n {children}\n </div>\n );\n};\n\nconst getTabContentStyle = (theme: GrafanaTheme2) => ({\n tabContent: css({\n background: theme.colors.background.primary,\n }),\n});\n"],"names":[],"mappings":";;;;;AAcO,MAAM,aAAa,CAAC,EAAE,UAAU,SAAA,EAAW,GAAG,WAAU,KAAa;AAC1E,EAAA,MAAM,MAAA,GAAS,WAAW,kBAAkB,CAAA;AAE5C,EAAA,uBACE,GAAA,CAAC,KAAA,EAAA,EAAK,GAAG,SAAA,EAAW,SAAA,EAAW,GAAG,MAAA,CAAO,UAAA,EAAY,SAAS,CAAA,EAC3D,QAAA,EACH,CAAA;AAEJ;AAEA,MAAM,kBAAA,GAAqB,CAAC,KAAA,MAA0B;AAAA,EACpD,YAAY,GAAA,CAAI;AAAA,IACd,UAAA,EAAY,KAAA,CAAM,MAAA,CAAO,UAAA,CAAW;AAAA,GACrC;AACH,CAAA,CAAA;;;;"}