({ label, code, multiline, onCopy })
| 41 | ); |
| 42 | |
| 43 | const CodeBlock: React.FC<{ label: string; code: string; multiline?: boolean; onCopy: (text: string) => void }> = ({ label, code, multiline, onCopy }) => ( |
| 44 | <div style={{ display: 'flex', flexDirection: 'column' }}> |
| 45 | <p style={{ color: 'rgba(255,255,255,0.5)', fontSize: 12, margin: '0 0 6px 0' }}>{label}</p> |
| 46 | <div |
| 47 | style={{ |
| 48 | display: 'flex', |
| 49 | justifyContent: 'space-between', |
| 50 | alignItems: multiline ? 'flex-start' : 'center', |
| 51 | background: '#000000', |
| 52 | borderRadius: 6, |
| 53 | padding: '4px 16px', |
| 54 | border: '1px solid rgba(255,255,255,0.16)', |
| 55 | }} |
| 56 | > |
| 57 | <pre style={{ color: 'rgba(255,255,255,0.8)', fontSize: 13, fontFamily: 'Menlo, monospace', margin: 0, whiteSpace: 'pre-wrap', lineHeight: '22px' }}> |
| 58 | {code} |
| 59 | </pre> |
| 60 | <div |
| 61 | onClick={() => onCopy(code)} |
| 62 | style={{ paddingTop: 4, paddingBottom: 4, cursor: 'pointer', flexShrink: 0 }} |
| 63 | > |
| 64 | <img src={copyIcon} alt="copy" style={{ width: 16, height: 16 }} /> |
| 65 | </div> |
| 66 | </div> |
| 67 | </div> |
| 68 | ); |
| 69 | |
| 70 | const QuickStartSection: React.FC = () => { |
| 71 | const { t } = useTranslation(); |
nothing calls this directly
no outgoing calls
no test coverage detected