widgets.tsx 1003 B

1234567891011121314151617181920212223242526272829303132333435
  1. import styled from '@emotion/styled';
  2. import Panel from 'sentry/components/panels/panel';
  3. import {space} from 'sentry/styles/space';
  4. import DeviceClassBreakdownBarChart from 'sentry/views/insights/mobile/appStarts/components/charts/deviceClassBreakdownBarChart';
  5. import StartDurationWidget from 'sentry/views/insights/mobile/appStarts/components/startDurationWidget';
  6. function SummaryWidgets({additionalFilters}) {
  7. return (
  8. <WidgetLayout>
  9. <div style={{gridArea: '1 / 1'}}>
  10. <StartDurationWidget additionalFilters={additionalFilters} chartHeight={120} />
  11. </div>
  12. <div style={{gridArea: '1 / 2'}}>
  13. <DeviceClassBreakdownBarChart
  14. additionalFilters={additionalFilters}
  15. chartHeight={120}
  16. />
  17. </div>
  18. </WidgetLayout>
  19. );
  20. }
  21. export default SummaryWidgets;
  22. const WidgetLayout = styled('div')`
  23. display: grid;
  24. grid-template-rows: 200px;
  25. grid-template-columns: 1fr 1fr;
  26. gap: ${space(1.5)};
  27. ${Panel} {
  28. height: 100%;
  29. }
  30. `;