@@ -13,6 +13,7 @@ const SignInOutButton = ({
1313 openWalletModal,
1414 injectedProvider,
1515 closeModal,
16+ expandToContainer,
1617} ) => {
1718 const notMobile = useMediaQuery ( ) ;
1819
@@ -70,9 +71,31 @@ const SignInOutButton = ({
7071 { 'is-primary' : ! loggedIn } ,
7172 { 'px-2' : ! notMobile }
7273 ) ;
73- const addressStyle = classnames ( '' , { 'smaller -text' : ! notMobile } ) ;
74+ const addressStyle = classnames ( '' , { 'small -text' : ! notMobile } ) ;
7475
75- return (
76+ return ! loggedIn ? (
77+ < >
78+ < button
79+ onClick = { connectWallet }
80+ className = { buttonClass }
81+ style = {
82+ expandToContainer
83+ ? { width : '100%' , height : '48px' }
84+ : notMobile
85+ ? {
86+ width : '159px' ,
87+ height : '40px' ,
88+ }
89+ : { width : '121px' , height : '32px' }
90+ }
91+ >
92+ < span className = "has-text-weight-bold" > Connect</ span >
93+ < span className = "is-hidden-mobile has-text-weight-bold" >
94+ Wallet
95+ </ span >
96+ </ button >
97+ </ >
98+ ) : (
7699 < >
77100 < div className = { dropdownBackground } />
78101 < div
@@ -91,29 +114,20 @@ const SignInOutButton = ({
91114 ...( loggedIn ? { width : '147px' } : { width : '206px' } ) ,
92115 height : '40px' ,
93116 }
94- : { width : '105px ' , height : '32px' }
117+ : { width : '121px ' , height : '32px' }
95118 }
96119 >
97- { loggedIn ? (
98- < div className = "is-flex is-align-items-center flex-1" >
99- < Blockies
100- seed = { addr }
101- size = { notMobile ? 6.5 : 5 }
102- scale = { 4 }
103- className = "blockies"
104- />
105- < div className = "is-flex flex-1 is-justify-content-flex-end" >
106- < p className = { addressStyle } > { truncateAddress ( addr , 4 , 4 ) } </ p >
107- </ div >
120+ < div className = "is-flex is-align-items-center flex-1" >
121+ < Blockies
122+ seed = { addr }
123+ size = { notMobile ? 6.5 : 5 }
124+ scale = { 4 }
125+ className = "blockies"
126+ />
127+ < div className = "is-flex flex-1 is-justify-content-flex-end pr-1-mobile" >
128+ < p className = { addressStyle } > { truncateAddress ( addr , 4 , 4 ) } </ p >
108129 </ div >
109- ) : (
110- < >
111- < span className = "has-text-weight-bold" > Connect</ span >
112- < span className = "is-hidden-mobile has-text-weight-bold" >
113- Wallet
114- </ span >
115- </ >
116- ) }
130+ </ div >
117131 </ button >
118132 </ div >
119133
@@ -122,7 +136,7 @@ const SignInOutButton = ({
122136 id = "dropdown-menu"
123137 role = "menu"
124138 ref = { dropdownRef }
125- style = { ! notMobile ? { left : '-170px ' } : { left : '-130px' } }
139+ style = { ! notMobile ? { left : '-155px ' } : { left : '-130px' } }
126140 >
127141 < div
128142 className = "dropdown-content p-0 rounded"
0 commit comments