| import { IconButton } from "@mui/material"; | |||||
| import PropTypes from "prop-types"; | |||||
| import React from "react"; | |||||
| import userPageBtnIcon from "../../assets/images/userPageBtnIcon.png"; | |||||
| import { useTheme } from "@mui/system"; | |||||
| import { useMediaQuery } from "@mui/material"; | |||||
| const EditButton = ({ onEnableEdit }) => { | |||||
| const theme = useTheme(); | |||||
| const matches = useMediaQuery(theme.breakpoints.down("sm")); | |||||
| return ( | |||||
| <IconButton | |||||
| className={"c-btn--primary-outlined c-btn userPageBtn ml-20px no-padding"} | |||||
| onClick={onEnableEdit} | |||||
| > | |||||
| {!matches && "Rezim uredjivanja"} | |||||
| <img | |||||
| style={{ | |||||
| position: "relative", | |||||
| top: -0.25, | |||||
| paddingLeft: matches ? "0px" : "10px", | |||||
| }} | |||||
| src={userPageBtnIcon} | |||||
| /> | |||||
| </IconButton> | |||||
| ); | |||||
| }; | |||||
| EditButton.propTypes = { | |||||
| onEnableEdit: PropTypes.func, | |||||
| }; | |||||
| export default EditButton; |
| lastName: Yup.string().required(t("login.lastnameRequired")), | lastName: Yup.string().required(t("login.lastnameRequired")), | ||||
| email: Yup.string() | email: Yup.string() | ||||
| .required(t("login.emailRequired")) | .required(t("login.emailRequired")) | ||||
| .matches(/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/, "Invalid email format."), | |||||
| .matches(/^[\w-.]+@([\w-]+\.)+[\w-]{2,4}$/, t("login.invalidEmail")), | |||||
| }), | }), | ||||
| onSubmit: handleSubmit, | onSubmit: handleSubmit, | ||||
| validateOnBlur: true, | validateOnBlur: true, |
| forgotPasswordEmail: "Email", | forgotPasswordEmail: "Email", | ||||
| useDifferentEmail: "Use different email address or username", | useDifferentEmail: "Use different email address or username", | ||||
| signInWithGoogle: "Continue with google", | signInWithGoogle: "Continue with google", | ||||
| invalidEmail: "Invalid email format", | |||||
| }, | }, | ||||
| password: { | password: { | ||||
| weak: "weak", | weak: "weak", | ||||
| users: { | users: { | ||||
| management: "User management", | management: "User management", | ||||
| fullName: "Name and surname", | fullName: "Name and surname", | ||||
| position: 'Position', | |||||
| invite: 'Invite', | |||||
| inviteUser: 'Invite user', | |||||
| regLink: 'Registration link', | |||||
| receiver: 'Receiver', | |||||
| user: 'User', | |||||
| contact: 'Contact', | |||||
| phone: 'Phone', | |||||
| socials: 'Social Media', | |||||
| position: "Position", | |||||
| invite: "Invite", | |||||
| inviteUser: "Invite user", | |||||
| regLink: "Registration link", | |||||
| receiver: "Receiver", | |||||
| user: "User", | |||||
| contact: "Contact", | |||||
| phone: "Phone", | |||||
| socials: "Social Media", | |||||
| }, | }, | ||||
| selectionLevels: { | selectionLevels: { | ||||
| done: { | done: { |
| // this._useDifferentEmail = value; | // this._useDifferentEmail = value; | ||||
| // }, | // }, | ||||
| signInWithGoogle: "Prijava putem Google-a", | signInWithGoogle: "Prijava putem Google-a", | ||||
| invalidEmail:"Format adrese nije validan" | |||||
| }, | }, | ||||
| // password: { | // password: { | ||||
| // weak: 'weak', | // weak: 'weak', |