button.tsx 391 B

12345678910111213141516171819202122
  1. import React from 'react';
  2. import 'antd/dist/antd.css'
  3. import { DatePicker } from 'antd'
  4. export type ButtonProps = {
  5. /**
  6. * a text to be rendered in the component.
  7. */
  8. text: string
  9. };
  10. export function Button({ text }: ButtonProps) {
  11. function onChange(checked) {
  12. console.log(`switch to ${checked}`);
  13. }
  14. return (
  15. <div>
  16. {text}
  17. <DatePicker />
  18. </div>
  19. );
  20. }