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 ' ;
33import disableScroll from 'disable-scroll' ;
44
55import Block from './components/Block' ;
@@ -40,38 +40,36 @@ export default function App() {
4040 return (
4141 < Box >
4242 < GlobalStyles />
43- < BoxCenter minHeight = { 256 } px = "xl" textAlign = "center ">
43+ < FlexCenter minHeight = { 256 } px = "xl" >
4444 < H1 > react-floater</ H1 >
4545 < Paragraph bold > A component to create awesome tooltips, modals and more!</ Paragraph >
4646 { window . innerWidth >= 768 && < WithPosition cb = { callback } /> }
47- </ BoxCenter >
47+ </ FlexCenter >
4848 < Block gray >
4949 < H2 mb = "xxl" > The classic examples</ H2 >
5050
51- < Content >
51+ < Flex direction = "column" gap = "xl" width = "100%" >
5252 < WithAutoOpen cb = { callback } />
53- < Content my = "xl" spaced >
53+ < Flex justify = "space-between" maxWidth = { 500 } mx = "auto" width = "100%" >
5454 < WithTitleAndFooter cb = { callback } />
5555 < WithCustomStyles cb = { callback } />
56- </ Content >
57- < BoxCenter >
58- < WithStyledComponents cb = { callback } />
59- </ BoxCenter >
60- </ Content >
56+ </ Flex >
57+ < WithStyledComponents cb = { callback } />
58+ </ Flex >
6159 </ Block >
6260 < Block >
6361 < H2 > Hover</ H2 >
64- < Paragraph color = "gray" size = "mid " >
62+ < Paragraph color = "gray" size = "md " >
6563 It will switch to click on mobile.
6664 < br />
6765 (can be disabled with < b > disableHoverToClick</ b > prop)
6866 </ Paragraph >
6967
70- < Content mt = "xxxl" spaced >
68+ < Spacer distribution = "center" gap = "lg" mt = "xxxl" orientation = "vertical" >
7169 < WithHoverDefault cb = { callback } />
7270 < WithHoverCustomDelay cb = { callback } />
7371 < WithHoverAndNoDelay cb = { callback } />
74- </ Content >
72+ </ Spacer >
7573 </ Block >
7674 < Block gray >
7775 < H2 mb = "xxl" > Inside text</ H2 >
@@ -83,11 +81,11 @@ export default function App() {
8381 </ Block >
8482 < Block gray >
8583 < H2 mb = "xxl" > Custom targets</ H2 >
86- < Content maxWidth = { 640 } mb = "xxl" spaced >
84+ < Content maxWidth = { 640 } mb = "xxl" >
8785 < ProxyMode cb = { callback } />
8886 < BeaconMode cb = { callback } />
8987 </ Content >
90- < Content maxWidth = { 640 } spaced >
88+ < Content maxWidth = { 640 } >
9189 < ControlledMode cb = { callback } />
9290 < Modal cb = { callback } />
9391 </ Content >
0 commit comments