1
- import { useUnmount } from 'react-use ' ;
2
- import { Box , BoxCenter , H1 , H2 , Paragraph } from '@gilbarbara/components ' ;
1
+ import { Box , Flex , FlexCenter , H1 , H2 , Paragraph , Spacer } from '@gilbarbara/components ' ;
2
+ import { useUnmount } from '@gilbarbara/hooks ' ;
3
3
import disableScroll from 'disable-scroll' ;
4
4
5
5
import Block from './components/Block' ;
@@ -40,38 +40,36 @@ export default function App() {
40
40
return (
41
41
< Box >
42
42
< GlobalStyles />
43
- < BoxCenter minHeight = { 256 } px = "xl" textAlign = "center ">
43
+ < FlexCenter minHeight = { 256 } px = "xl" >
44
44
< H1 > react-floater</ H1 >
45
45
< Paragraph bold > A component to create awesome tooltips, modals and more!</ Paragraph >
46
46
{ window . innerWidth >= 768 && < WithPosition cb = { callback } /> }
47
- </ BoxCenter >
47
+ </ FlexCenter >
48
48
< Block gray >
49
49
< H2 mb = "xxl" > The classic examples</ H2 >
50
50
51
- < Content >
51
+ < Flex direction = "column" gap = "xl" width = "100%" >
52
52
< WithAutoOpen cb = { callback } />
53
- < Content my = "xl" spaced >
53
+ < Flex justify = "space-between" maxWidth = { 500 } mx = "auto" width = "100%" >
54
54
< WithTitleAndFooter cb = { callback } />
55
55
< WithCustomStyles cb = { callback } />
56
- </ Content >
57
- < BoxCenter >
58
- < WithStyledComponents cb = { callback } />
59
- </ BoxCenter >
60
- </ Content >
56
+ </ Flex >
57
+ < WithStyledComponents cb = { callback } />
58
+ </ Flex >
61
59
</ Block >
62
60
< Block >
63
61
< H2 > Hover</ H2 >
64
- < Paragraph color = "gray" size = "mid " >
62
+ < Paragraph color = "gray" size = "md " >
65
63
It will switch to click on mobile.
66
64
< br />
67
65
(can be disabled with < b > disableHoverToClick</ b > prop)
68
66
</ Paragraph >
69
67
70
- < Content mt = "xxxl" spaced >
68
+ < Spacer distribution = "center" gap = "lg" mt = "xxxl" orientation = "vertical" >
71
69
< WithHoverDefault cb = { callback } />
72
70
< WithHoverCustomDelay cb = { callback } />
73
71
< WithHoverAndNoDelay cb = { callback } />
74
- </ Content >
72
+ </ Spacer >
75
73
</ Block >
76
74
< Block gray >
77
75
< H2 mb = "xxl" > Inside text</ H2 >
@@ -83,11 +81,11 @@ export default function App() {
83
81
</ Block >
84
82
< Block gray >
85
83
< H2 mb = "xxl" > Custom targets</ H2 >
86
- < Content maxWidth = { 640 } mb = "xxl" spaced >
84
+ < Content maxWidth = { 640 } mb = "xxl" >
87
85
< ProxyMode cb = { callback } />
88
86
< BeaconMode cb = { callback } />
89
87
</ Content >
90
- < Content maxWidth = { 640 } spaced >
88
+ < Content maxWidth = { 640 } >
91
89
< ControlledMode cb = { callback } />
92
90
< Modal cb = { callback } />
93
91
</ Content >
0 commit comments