style: split AccountMenu to smaller components

- change link to button for "Advanced Options"
- show cursor as pointer on checkbox and its label
This commit is contained in:
VardanHakobyan
2021-06-11 15:01:56 +04:00
parent 8a2fa13d4e
commit abb0b6595e
2 changed files with 9 additions and 8 deletions

View File

@@ -110,7 +110,6 @@ const Authentication: FC<Props> = ({
setIsAuthenticating(true); setIsAuthenticating(true);
const response = await application.signIn( const response = await application.signIn(
// const response = await handleSignIn(
email, email,
password, password,
isStrictSignIn, isStrictSignIn,
@@ -148,7 +147,6 @@ const Authentication: FC<Props> = ({
setIsAuthenticating(true); setIsAuthenticating(true);
const response = await application.register( const response = await application.register(
// const response = await handleRegister(
email, email,
password, password,
isEphemeral, isEphemeral,
@@ -290,11 +288,11 @@ const Authentication: FC<Props> = ({
ref={passwordConfirmationInputRef} ref={passwordConfirmationInputRef}
/>} />}
<div className="sk-panel-row" /> <div className="sk-panel-row" />
<a className="sk-panel-row sk-bold" onClick={() => { <button className="sn-button small info" onClick={() => {
setShowAdvanced(!showAdvanced); setShowAdvanced(!showAdvanced);
}}> }}>
Advanced Options Advanced Options
</a> </button>
</div> </div>
{showAdvanced && ( {showAdvanced && (
<div className="sk-notification unpadded contrast advanced-options sk-panel-row"> <div className="sk-notification unpadded contrast advanced-options sk-panel-row">
@@ -308,14 +306,13 @@ const Authentication: FC<Props> = ({
name="server" name="server"
placeholder="Server URL" placeholder="Server URL"
onChange={handleHostInputChange} onChange={handleHostInputChange}
// value={url}
value={server} value={server}
required required
/> />
</div> </div>
{showLogin && ( {showLogin && (
<label className="sk-label padded-row sk-panel-row justify-left"> <label className="sk-label padded-row sk-panel-row justify-left">
<div className="sk-horizontal-group tight"> <div className="sk-horizontal-group tight cursor-pointer">
<input <input
className="sk-input" className="sk-input"
type="checkbox" type="checkbox"
@@ -365,7 +362,7 @@ const Authentication: FC<Props> = ({
{!isAuthenticating && ( {!isAuthenticating && (
<div className="sk-panel-section no-bottom-pad"> <div className="sk-panel-section no-bottom-pad">
<label className="sk-panel-row justify-left"> <label className="sk-panel-row justify-left">
<div className="sk-horizontal-group tight"> <div className="sk-horizontal-group tight cursor-pointer">
<input <input
type="checkbox" type="checkbox"
checked={!isEphemeral} checked={!isEphemeral}
@@ -376,7 +373,7 @@ const Authentication: FC<Props> = ({
</label> </label>
{notesAndTagsCount > 0 && ( {notesAndTagsCount > 0 && (
<label className="sk-panel-row justify-left"> <label className="sk-panel-row justify-left">
<div className="sk-horizontal-group tight"> <div className="sk-horizontal-group tight cursor-pointer">
<input <input
type="checkbox" type="checkbox"
checked={shouldMergeLocal} checked={shouldMergeLocal}

View File

@@ -193,6 +193,10 @@ $screen-md-max: ($screen-lg-min - 1) !default;
.cursor-pointer { .cursor-pointer {
cursor: pointer; cursor: pointer;
input[type="checkbox"] {
cursor: pointer;
}
} }
.fill-current { .fill-current {