backtop.stories.jsx 656 B

12345678910111213141516171819202122232425262728293031323334353637
  1. import React from 'react';
  2. import BackTop from '../index';
  3. import { IconArrowUp } from '@douyinfe/semi-icons';
  4. export default {
  5. title: 'BackTop',
  6. }
  7. export const Default = () => (
  8. <div>
  9. <div style={{ height: 1600, width: 300, background: 'grey' }}></div>
  10. <BackTop visibilityHeight={-1} />
  11. </div>
  12. );
  13. export const Custom = () => (
  14. <div>
  15. <div
  16. style={{
  17. height: 1600,
  18. width: 300,
  19. background: 'grey',
  20. }}
  21. ></div>
  22. <BackTop
  23. style={{
  24. height: 40,
  25. width: 40,
  26. backgroundColor: '#ddd',
  27. paddingTop: 12,
  28. }}
  29. >
  30. <IconArrowUp />
  31. </BackTop>
  32. </div>
  33. );