item.tsx 571 B

12345678910111213141516171819202122232425
  1. import styled from '@emotion/styled';
  2. import ListItem from 'sentry/components/list/listItem';
  3. import {space} from 'sentry/styles/space';
  4. type Props = {
  5. children: React.ReactElement;
  6. title: React.ReactNode;
  7. className?: string;
  8. subtitle?: React.ReactNode;
  9. };
  10. const Item = styled(({title, subtitle, children, className}: Props) => (
  11. <ListItem className={className}>
  12. {title}
  13. {subtitle && <small>{subtitle}</small>}
  14. <div>{children}</div>
  15. </ListItem>
  16. ))`
  17. padding-top: ${space(0.25)};
  18. display: grid;
  19. gap: ${space(1.5)};
  20. `;
  21. export default Item;