Download projects/shared/src/renderer/components/ImportPanel.tsx from smlflg/learn-harness-engineering: direct link, hf CLI and curl.
- Browser
- Download file 823 Bytes
-
https://huggingface.co/smlflg/learn-harness-engineering/resolve/main/projects/shared/src/renderer/components/ImportPanel.tsx
- Command line
-
hf download hf://smlflg/learn-harness-engineering/projects/shared/src/renderer/components/ImportPanel.tsx
-
curl -L -o ImportPanel.tsx https://huggingface.co/smlflg/learn-harness-engineering/resolve/main/projects/shared/src/renderer/components/ImportPanel.tsx
823 Bytes
| import React from 'react'; | |
| interface Props { | |
| onImport: (filePath: string) => void; | |
| } | |
| export function ImportPanel({ onImport }: Props) { | |
| return ( | |
| <div style={{ | |
| padding: '20px', | |
| background: '#16213e', | |
| borderRadius: '6px', | |
| border: '1px dashed #0f3460', | |
| textAlign: 'center', | |
| color: '#888', | |
| }}> | |
| <div style={{ fontSize: '14px', marginBottom: '8px' }}>Import Documents</div> | |
| <div style={{ fontSize: '12px' }}> | |
| Use the import button or drag files here. | |
| <br /> | |
| Supported: .txt, .md files | |
| </div> | |
| <input | |
| type="file" | |
| accept=".txt,.md" | |
| onChange={e => { | |
| const file = e.target.files?.[0]; | |
| if (file) onImport(file.path); | |
| }} | |
| style={{ marginTop: '10px' }} | |
| /> | |
| </div> | |
| ); | |
| } | |