@grafana/ui
Version:
Grafana Components Library
1 lines • 2.01 kB
Source Map (JSON)
{"version":3,"file":"MessageRows.mjs","sources":["../../../../src/components/Combobox/MessageRows.tsx"],"sourcesContent":["import { ReactNode } from 'react';\n\nimport { Trans } from '@grafana/i18n';\n\nimport { Icon } from '../Icon/Icon';\nimport { Box } from '../Layout/Box/Box';\nimport { Stack } from '../Layout/Stack/Stack';\nimport { Text } from '../Text/Text';\n\nexport const AsyncError = () => (\n <MessageRow>\n <Text color=\"warning\">\n <Icon name=\"exclamation-triangle\" size=\"md\" />\n </Text>\n <Trans i18nKey=\"combobox.async.error\">An error occurred while loading options.</Trans>\n </MessageRow>\n);\n\nexport const NotFoundError = () => (\n <MessageRow>\n <Trans i18nKey=\"combobox.options.no-found\">No options found.</Trans>\n </MessageRow>\n);\n\nexport const LoadingOptions = () => (\n <MessageRow>\n <Trans i18nKey=\"combobox.options.loading\">Loading options...</Trans>\n </MessageRow>\n);\n\nconst MessageRow = ({ children }: { children: ReactNode }) => {\n return (\n <Box padding={2}>\n <Stack justifyContent=\"center\" alignItems=\"center\" direction=\"column\">\n {children}\n </Stack>\n </Box>\n );\n};\n"],"names":[],"mappings":";;;;;;;;AASO,MAAM,UAAA,GAAa,sBACxB,IAAA,CAAC,UAAA,EAAA,EACC,QAAA,EAAA;AAAA,kBAAA,GAAA,CAAC,IAAA,EAAA,EAAK,OAAM,SAAA,EACV,QAAA,kBAAA,GAAA,CAAC,QAAK,IAAA,EAAK,sBAAA,EAAuB,IAAA,EAAK,IAAA,EAAK,CAAA,EAC9C,CAAA;AAAA,kBACA,GAAA,CAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,sBAAA,EAAuB,QAAA,EAAA,0CAAA,EAAwC;AAAA,CAAA,EAChF;AAGK,MAAM,aAAA,GAAgB,sBAC3B,GAAA,CAAC,UAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,2BAAA,EAA4B,QAAA,EAAA,mBAAA,EAAiB,CAAA,EAC9D;AAGK,MAAM,cAAA,GAAiB,sBAC5B,GAAA,CAAC,UAAA,EAAA,EACC,8BAAC,KAAA,EAAA,EAAM,OAAA,EAAQ,0BAAA,EAA2B,QAAA,EAAA,oBAAA,EAAkB,CAAA,EAC9D;AAGF,MAAM,UAAA,GAAa,CAAC,EAAE,QAAA,EAAS,KAA+B;AAC5D,EAAA,uBACE,GAAA,CAAC,GAAA,EAAA,EAAI,OAAA,EAAS,CAAA,EACZ,QAAA,kBAAA,GAAA,CAAC,KAAA,EAAA,EAAM,cAAA,EAAe,QAAA,EAAS,UAAA,EAAW,QAAA,EAAS,SAAA,EAAU,QAAA,EAC1D,UACH,CAAA,EACF,CAAA;AAEJ,CAAA;;;;"}