fieldDescription.tsx 463 B

123456789101112131415161718192021222324
  1. import {css} from '@emotion/react';
  2. import styled from '@emotion/styled';
  3. import space from 'sentry/styles/space';
  4. const inlineStyle = p =>
  5. p.inline
  6. ? css`
  7. width: 50%;
  8. padding-right: 10px;
  9. flex-shrink: 0;
  10. `
  11. : css`
  12. margin-bottom: ${space(1)};
  13. `;
  14. const FieldDescription = styled('label')<{inline?: boolean}>`
  15. font-weight: normal;
  16. margin-bottom: 0;
  17. ${inlineStyle};
  18. `;
  19. export default FieldDescription;