terminal.tsx 573 B

12345678910111213141516171819202122232425
  1. import styled from '@emotion/styled';
  2. import {CodeSnippet} from 'sentry/components/codeSnippet';
  3. import {space} from 'sentry/styles/space';
  4. type Props = {
  5. command: string;
  6. };
  7. function Terminal({command}: Props) {
  8. return <StyledCodeSnippet language="bash">{command}</StyledCodeSnippet>;
  9. }
  10. export default Terminal;
  11. const StyledCodeSnippet = styled(CodeSnippet)`
  12. padding-left: ${space(2)};
  13. &:before {
  14. content: '\u0024';
  15. position: absolute;
  16. padding-top: ${space(1)};
  17. color: var(--prism-comment);
  18. font-size: ${p => p.theme.codeFontSize};
  19. }
  20. `;