版博士V2.0程序
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.
 
 
 
 

56 lines
1.3 KiB

  1. const code = `
  2. import * as React from 'react';
  3. import styles from './index.module.scss';
  4. import { Button } from "@alifd/next";
  5. const Btn = () => {
  6. return (
  7. <div>
  8. <h2>转译前</h2>
  9. <div>
  10. <Button type="normal">Normal</Button>
  11. <Button type="primary">Prirmary</Button>
  12. <Button type="secondary">Secondary</Button>
  13. <Button type="normal" text>Normal</Button>
  14. <Button type="primary" text>Primary</Button>
  15. <Button type="secondary" text>Secondary</Button>
  16. <Button type="normal" warning>Normal</Button>
  17. </div>
  18. </div>
  19. );
  20. };
  21. export default Btn;
  22. `;
  23. const compareCode = `
  24. import * as React from 'react';
  25. import styles from './index.module.scss';
  26. import { Button } from "antd"
  27. const Btn = () => {
  28. return (
  29. <div>
  30. <h2>转译后</h2>
  31. <div>
  32. <Button type="default" ></Button>
  33. <Button type="primary">Prirmary</Button>
  34. <Button type="secondary">Secondary</Button>
  35. <Button type="link" type="default"></Button>
  36. <Button type="link" type="primary"></Button>
  37. <Button type="link" type="secondary"></Button>
  38. <Button danger type="default"></Button>
  39. </div>
  40. </div>
  41. );
  42. };
  43. export default Btn;
  44. `;
  45. module.exports = { code, compareCode };