import { css } from '@emotion/react';
import { darkTheme, spacing } from '@expo/styleguide';
import { Snippet } from '../Snippet';
import { SnippetContent } from '../SnippetContent';
import { SnippetHeader } from '../SnippetHeader';
import { CopyAction } from '../actions/CopyAction';
import { CODE } from '~/ui/components/Text';
type TerminalProps = {
cmd: string[];
cmdCopy?: string;
hideOverflow?: boolean;
includeMargin?: boolean;
title?: string;
};
export const Terminal = ({
cmd,
cmdCopy,
hideOverflow,
includeMargin = true,
title = 'Terminal',
}: TerminalProps) => (
;
}
if (line.startsWith('#')) {
return (
{line}
);
}
if (line.startsWith('$')) {
return (
→
{line.substring(1).trim()}
{line}
);
}
const wrapperStyle = css`
li & {
margin-top: ${spacing[4]}px;
display: flex;
}
`;
const unselectableStyle = css`
user-select: none;
`;
const codeStyle = css`
white-space: pre;
display: inline-block;
line-height: 140%;
background-color: transparent;
border: none;
color: ${darkTheme.text.default};
`;