login google logo
This commit is contained in:
@@ -6,6 +6,7 @@ interface ButtonProps {
|
|||||||
text?: string;
|
text?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
children?: React.ReactNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const PrimaryButton: React.FC<ButtonProps> = ({
|
export const PrimaryButton: React.FC<ButtonProps> = ({
|
||||||
@@ -13,6 +14,7 @@ export const PrimaryButton: React.FC<ButtonProps> = ({
|
|||||||
text = "",
|
text = "",
|
||||||
className,
|
className,
|
||||||
onClick,
|
onClick,
|
||||||
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<label
|
<label
|
||||||
@@ -40,7 +42,7 @@ export const PrimaryButton: React.FC<ButtonProps> = ({
|
|||||||
"[&:focus-visible+*]:outline-liquid-brightmain",
|
"[&:focus-visible+*]:outline-liquid-brightmain",
|
||||||
)}
|
)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => {onClick()}}
|
onClick={() => { onClick() }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Граница при выделении через tab */}
|
{/* Граница при выделении через tab */}
|
||||||
@@ -51,7 +53,7 @@ export const PrimaryButton: React.FC<ButtonProps> = ({
|
|||||||
"px-[16px] py-[8px]",
|
"px-[16px] py-[8px]",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{text}
|
{children || text}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -60,7 +62,7 @@ export const PrimaryButton: React.FC<ButtonProps> = ({
|
|||||||
disabled && "text-liquid-light"
|
disabled && "text-liquid-light"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{text}
|
{children || text}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ interface ButtonProps {
|
|||||||
text?: string;
|
text?: string;
|
||||||
className?: string;
|
className?: string;
|
||||||
onClick: () => void;
|
onClick: () => void;
|
||||||
|
children?: React.ReactNode;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SecondaryButton: React.FC<ButtonProps> = ({
|
export const SecondaryButton: React.FC<ButtonProps> = ({
|
||||||
@@ -13,6 +15,7 @@ export const SecondaryButton: React.FC<ButtonProps> = ({
|
|||||||
text = "",
|
text = "",
|
||||||
className,
|
className,
|
||||||
onClick,
|
onClick,
|
||||||
|
children,
|
||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<label
|
<label
|
||||||
@@ -39,7 +42,7 @@ export const SecondaryButton: React.FC<ButtonProps> = ({
|
|||||||
"[&:focus-visible+*]:outline-liquid-brightmain",
|
"[&:focus-visible+*]:outline-liquid-brightmain",
|
||||||
)}
|
)}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
onClick={() => {onClick()}}
|
onClick={() => { onClick() }}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
{/* Граница при выделении через tab */}
|
{/* Граница при выделении через tab */}
|
||||||
@@ -50,7 +53,7 @@ export const SecondaryButton: React.FC<ButtonProps> = ({
|
|||||||
"px-[16px] py-[8px]",
|
"px-[16px] py-[8px]",
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{text}
|
{children || text}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
@@ -58,7 +61,7 @@ export const SecondaryButton: React.FC<ButtonProps> = ({
|
|||||||
disabled && "text-liquid-light"
|
disabled && "text-liquid-light"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{text}
|
{children || text}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import { cn } from "../../../lib/cn";
|
|||||||
import { setMenuActivePage } from "../../../redux/slices/store";
|
import { setMenuActivePage } from "../../../redux/slices/store";
|
||||||
import { Balloon } from "../../../assets/icons/auth";
|
import { Balloon } from "../../../assets/icons/auth";
|
||||||
import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
||||||
|
import { googleLogo } from "../../../assets/icons/input";
|
||||||
|
|
||||||
const Login = () => {
|
const Login = () => {
|
||||||
const dispatch = useAppDispatch();
|
const dispatch = useAppDispatch();
|
||||||
@@ -82,9 +83,13 @@ const Login = () => {
|
|||||||
/>
|
/>
|
||||||
<SecondaryButton
|
<SecondaryButton
|
||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={navigateToRegister}
|
onClick={() => { }}
|
||||||
text="Войти с Google "
|
>
|
||||||
/>
|
<div className="flex items-center">
|
||||||
|
<img src={googleLogo} className="h-[24px] w-[24px] mr-[15px]" />
|
||||||
|
Вход с Google
|
||||||
|
</div>
|
||||||
|
</SecondaryButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import { Balloon } from "../../../assets/icons/auth";
|
|||||||
import { Link } from "react-router-dom";
|
import { Link } from "react-router-dom";
|
||||||
import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
import { SecondaryButton } from "../../../components/button/SecondaryButton";
|
||||||
import { Checkbox } from "../../../components/checkbox/Checkbox";
|
import { Checkbox } from "../../../components/checkbox/Checkbox";
|
||||||
|
import { googleLogo } from "../../../assets/icons/input";
|
||||||
|
|
||||||
|
|
||||||
const Register = () => {
|
const Register = () => {
|
||||||
@@ -95,8 +96,12 @@ const Register = () => {
|
|||||||
<SecondaryButton
|
<SecondaryButton
|
||||||
className="w-full"
|
className="w-full"
|
||||||
onClick={() => { }}
|
onClick={() => { }}
|
||||||
text="Регистрация с Google "
|
>
|
||||||
/>
|
<div className="flex items-center">
|
||||||
|
<img src={googleLogo} className="h-[24px] w-[24px] mr-[15px]" />
|
||||||
|
Регистрация с Google
|
||||||
|
</div>
|
||||||
|
</SecondaryButton>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user