styles.ts 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. import { css } from '@emotion/css';
  2. import { GrafanaTheme2 } from '@grafana/data';
  3. import { styleMixins } from '@grafana/ui';
  4. export const getStyles = (theme: GrafanaTheme2) => ({
  5. dashlistSectionHeader: css`
  6. margin-bottom: ${theme.spacing(2)};
  7. color: ${theme.colors.secondary.text};
  8. `,
  9. dashlistSection: css`
  10. margin-bottom: ${theme.spacing(2)};
  11. padding-top: 3px;
  12. `,
  13. dashlistLink: css`
  14. ${styleMixins.listItem(theme)}
  15. display: flex;
  16. cursor: pointer;
  17. margin: 3px;
  18. padding: 7px;
  19. `,
  20. dashlistStar: css`
  21. align-self: center;
  22. margin-right: 0px;
  23. color: ${theme.colors.secondary.text};
  24. z-index: 1;
  25. `,
  26. dashlistFolder: css`
  27. color: ${theme.colors.secondary.text};
  28. font-size: ${theme.typography.bodySmall.fontSize};
  29. line-height: ${theme.typography.body.lineHeight};
  30. `,
  31. dashlistTitle: css`
  32. &::after {
  33. position: absolute;
  34. content: '';
  35. left: 0;
  36. top: 0;
  37. bottom: 0;
  38. right: 0;
  39. }
  40. `,
  41. dashlistLinkBody: css`
  42. flex-grow: 1;
  43. overflow: hidden;
  44. text-overflow: ellipsis;
  45. `,
  46. dashlistItem: css`
  47. position: relative;
  48. list-style: none;
  49. `,
  50. gridContainer: css`
  51. display: grid;
  52. gap: ${theme.spacing(1)};
  53. grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  54. list-style: none;
  55. margin-bottom: ${theme.spacing(1)};
  56. `,
  57. });