fix: button and input heights (#1548)

This commit is contained in:
Aaryan Khandelwal 2023-07-18 15:00:06 +05:30 committed by GitHub
parent 9b423cea4b
commit 88fbe85087
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 20 additions and 15 deletions

View File

@ -136,7 +136,7 @@ export const EmailCodeForm = ({ handleSignIn }: any) => {
}} }}
error={errors.email} error={errors.email}
placeholder="Enter your email address..." placeholder="Enter your email address..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
@ -152,7 +152,7 @@ export const EmailCodeForm = ({ handleSignIn }: any) => {
}} }}
error={errors.token} error={errors.token}
placeholder="Enter code..." placeholder="Enter code..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
<button <button
type="button" type="button"
@ -186,7 +186,7 @@ export const EmailCodeForm = ({ handleSignIn }: any) => {
{codeSent ? ( {codeSent ? (
<PrimaryButton <PrimaryButton
type="submit" type="submit"
className="w-full text-center" className="w-full text-center h-[46px]"
size="md" size="md"
onClick={handleSubmit(handleSignin)} onClick={handleSubmit(handleSignin)}
disabled={!isValid && isDirty} disabled={!isValid && isDirty}
@ -196,7 +196,7 @@ export const EmailCodeForm = ({ handleSignIn }: any) => {
</PrimaryButton> </PrimaryButton>
) : ( ) : (
<PrimaryButton <PrimaryButton
className="w-full text-center" className="w-full text-center h-[46px]"
size="md" size="md"
onClick={() => { onClick={() => {
handleSubmit(onSubmit)().then(() => { handleSubmit(onSubmit)().then(() => {

View File

@ -71,7 +71,7 @@ export const EmailPasswordForm: React.FC<Props> = ({ onSubmit }) => {
}} }}
error={errors.email} error={errors.email}
placeholder="Enter your email address..." placeholder="Enter your email address..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
<div className="space-y-1"> <div className="space-y-1">
@ -85,7 +85,7 @@ export const EmailPasswordForm: React.FC<Props> = ({ onSubmit }) => {
}} }}
error={errors.password} error={errors.password}
placeholder="Enter your password..." placeholder="Enter your password..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
<div className="text-right text-xs"> <div className="text-right text-xs">
@ -108,7 +108,7 @@ export const EmailPasswordForm: React.FC<Props> = ({ onSubmit }) => {
<div> <div>
<PrimaryButton <PrimaryButton
type="submit" type="submit"
className="w-full text-center" className="w-full text-center h-[46px]"
disabled={!isValid && isDirty} disabled={!isValid && isDirty}
loading={isSubmitting} loading={isSubmitting}
> >

View File

@ -78,17 +78,17 @@ export const EmailResetPasswordForm: React.FC<Props> = ({ setIsResettingPassword
}} }}
error={errors.email} error={errors.email}
placeholder="Enter registered email address.." placeholder="Enter registered email address.."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
<div className="mt-5 flex flex-col-reverse sm:flex-row items-center gap-2"> <div className="mt-5 flex flex-col-reverse sm:flex-row items-center gap-2">
<SecondaryButton <SecondaryButton
className="w-full text-center" className="w-full text-center h-[46px]"
onClick={() => setIsResettingPassword(false)} onClick={() => setIsResettingPassword(false)}
> >
Go Back Go Back
</SecondaryButton> </SecondaryButton>
<PrimaryButton type="submit" className="w-full text-center" loading={isSubmitting}> <PrimaryButton type="submit" className="w-full text-center h-[46px]" loading={isSubmitting}>
{isSubmitting ? "Sending link..." : "Send reset link"} {isSubmitting ? "Sending link..." : "Send reset link"}
</PrimaryButton> </PrimaryButton>
</div> </div>

View File

@ -44,9 +44,9 @@ export const GithubLoginButton: FC<GithubLoginButtonProps> = ({ handleSignIn })
<Link <Link
href={`https://github.com/login/oauth/authorize?client_id=${NEXT_PUBLIC_GITHUB_ID}&redirect_uri=${loginCallBackURL}&scope=read:user,user:email`} href={`https://github.com/login/oauth/authorize?client_id=${NEXT_PUBLIC_GITHUB_ID}&redirect_uri=${loginCallBackURL}&scope=read:user,user:email`}
> >
<button className="flex w-full items-center justify-center gap-2 rounded border border-custom-border-300 p-2 text-sm font-medium text-custom-text-100 duration-300 hover:bg-custom-background-80"> <button className="flex w-full items-center justify-center gap-2 rounded border border-custom-border-300 p-2 text-sm font-medium text-custom-text-100 duration-300 hover:bg-custom-background-80 h-[46px]">
<Image <Image
src={theme === "light" ? githubBlackImage : githubWhiteImage} src={theme === "dark" ? githubWhiteImage : githubBlackImage}
height={20} height={20}
width={20} width={20}
alt="GitHub Logo" alt="GitHub Logo"

View File

@ -27,6 +27,7 @@ export const GoogleLoginButton: FC<IGoogleLoginButton> = (props) => {
theme: "outline", theme: "outline",
size: "large", size: "large",
logo_alignment: "center", logo_alignment: "center",
height: "46",
width: "360", width: "360",
text: "continue_with", text: "continue_with",
} as GsiButtonConfiguration // customization attributes } as GsiButtonConfiguration // customization attributes

View File

@ -121,7 +121,7 @@ const ResetPasswordPage: NextPage = () => {
}} }}
error={errors.password} error={errors.password}
placeholder="Enter new password..." placeholder="Enter new password..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
<div className="space-y-1"> <div className="space-y-1">
@ -135,10 +135,14 @@ const ResetPasswordPage: NextPage = () => {
}} }}
error={errors.confirmPassword} error={errors.confirmPassword}
placeholder="Confirm new password..." placeholder="Confirm new password..."
className="border-custom-border-300" className="border-custom-border-300 h-[46px]"
/> />
</div> </div>
<PrimaryButton type="submit" className="w-full text-center" loading={isSubmitting}> <PrimaryButton
type="submit"
className="w-full text-center h-[46px]"
loading={isSubmitting}
>
{isSubmitting ? "Resetting..." : "Reset"} {isSubmitting ? "Resetting..." : "Reset"}
</PrimaryButton> </PrimaryButton>
</form> </form>