Design system.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.
 
 
 

88 wiersze
2.2 KiB

  1. import * as React from 'react';
  2. import { NextPage } from 'next';
  3. import * as TesseractNumber from '@tesseract-design/web-number-react';
  4. import {Section, Subsection} from '@/components/Section';
  5. const NumberPage: NextPage = () => {
  6. return (
  7. <main className="my-16 md:my-32">
  8. <Section title="Spinner">
  9. <Subsection title="Default">
  10. <TesseractNumber.Spinner
  11. min={-100}
  12. max={100}
  13. step="any"
  14. label="Step"
  15. />
  16. </Subsection>
  17. </Section>
  18. <Section title="Slider">
  19. <Subsection title="Default">
  20. <TesseractNumber.Slider
  21. min={-100}
  22. max={100}
  23. />
  24. </Subsection>
  25. <Subsection title="Default (with tick marks)">
  26. <TesseractNumber.Slider
  27. min={-100}
  28. max={100}
  29. >
  30. <optgroup label="Test Values">
  31. <option value={-100}>
  32. Lowest
  33. </option>
  34. <option value={25}>
  35. 日本語
  36. </option>
  37. <option value={50} />
  38. <option value={100}>
  39. Highest
  40. </option>
  41. <option value={200}>
  42. Out of bounds
  43. </option>
  44. </optgroup>
  45. </TesseractNumber.Slider>
  46. </Subsection>
  47. <Subsection title="Vertical">
  48. <TesseractNumber.Slider
  49. min={-100}
  50. max={100}
  51. orient="vertical"
  52. >
  53. <optgroup label="Test Values">
  54. <option value={-100}>
  55. Lowest
  56. </option>
  57. <option value={25}>
  58. 日本語
  59. </option>
  60. <option value={50} />
  61. <option value={100}>
  62. Highest
  63. </option>
  64. <option value={200}>
  65. Out of bounds
  66. </option>
  67. </optgroup>
  68. </TesseractNumber.Slider>
  69. A
  70. </Subsection>
  71. </Section>
  72. <Section title="Matrix">
  73. <h2>
  74. Matrix
  75. </h2>
  76. <div>
  77. TODO
  78. <input type="range" />
  79. <input type="range" />
  80. </div>
  81. </Section>
  82. </main>
  83. )
  84. }
  85. export default NumberPage;