item.tsx 540 B

123456789101112131415161718192021222324
  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. display: grid;
  18. gap: ${space(1.5)};
  19. `;
  20. export default Item;