panelItem.tsx 549 B

123456789101112131415161718192021222324252627
  1. import styled from '@emotion/styled';
  2. import space from 'sentry/styles/space';
  3. type Props = {
  4. /**
  5. * Align items vertical center (assuming flex-direction isn't changed).
  6. */
  7. center?: boolean;
  8. /**
  9. * Disables the default padding
  10. */
  11. noPadding?: boolean;
  12. };
  13. const PanelItem = styled('div')<Props>`
  14. display: flex;
  15. border-bottom: 1px solid ${p => p.theme.innerBorder};
  16. ${p => p.noPadding || `padding: ${space(2)}`};
  17. ${p => p.center && 'align-items: center'};
  18. &:last-child {
  19. border: 0;
  20. }
  21. `;
  22. export default PanelItem;