Design system.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

53 lines
1.6 KiB

  1. import {NextPage} from 'next';
  2. import {DefaultLayout} from '@/components/DefaultLayout';
  3. import {Section, Subsection} from '@/components/Section';
  4. import * as TesseractBlob from '@tesseract-design/web-blob-react';
  5. const BlobPage: NextPage = () => {
  6. return (
  7. <DefaultLayout title="Blob">
  8. <Section title="FileSelectBox">
  9. <Subsection title="Default">
  10. <TesseractBlob.FileSelectBox
  11. label="File"
  12. name="file"
  13. border
  14. placeholder="Select a file"
  15. previewComponent={() => null}
  16. onChange={(e) => { console.log('change', e.currentTarget.name, e.currentTarget, e.currentTarget.files)}}
  17. />
  18. </Subsection>
  19. <Subsection title="Enhanced">
  20. <TesseractBlob.FileSelectBox
  21. label="File"
  22. name="file"
  23. border
  24. enhanced
  25. placeholder="Select a file"
  26. style={{
  27. height: 256,
  28. }}
  29. onChange={(e) => { console.log('change', e.currentTarget.name, e.currentTarget, e.currentTarget.files)}}
  30. />
  31. </Subsection>
  32. <Subsection title="Multiple">
  33. <TesseractBlob.FileSelectBox
  34. label="File"
  35. name="file"
  36. border
  37. enhanced
  38. placeholder="Select a file"
  39. multiple
  40. style={{
  41. height: 256,
  42. }}
  43. onChange={(e) => { console.log('change', e.currentTarget.name, e.currentTarget, e.currentTarget.files)}}
  44. />
  45. </Subsection>
  46. </Section>
  47. </DefaultLayout>
  48. )
  49. }
  50. export default BlobPage;