| import { IconButton } from "@mui/material"; | |||||
| import { Box, IconButton } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ` | ` | ||||
| export const IconButtonStyled = styled(IconButton)` | export const IconButtonStyled = styled(IconButton)` |
| containerStyle: PropTypes.any, | containerStyle: PropTypes.any, | ||||
| fullWidth: PropTypes.string, | fullWidth: PropTypes.string, | ||||
| buttonColor: PropTypes.string, | buttonColor: PropTypes.string, | ||||
| onClick: PropTypes.func | |||||
| }; | }; |
| import { Button } from "@mui/material"; | |||||
| import { Box, Button } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ` | ` | ||||
| export const LoginButtonStyled = styled(Button)` | export const LoginButtonStyled = styled(Button)` |
| buttoncolor: PropTypes.string, | buttoncolor: PropTypes.string, | ||||
| textcolor: PropTypes.string, | textcolor: PropTypes.string, | ||||
| className: PropTypes.string, | className: PropTypes.string, | ||||
| onClick: PropTypes.func, | |||||
| }; | }; |
| import { Button } from "@mui/material"; | |||||
| import { Box, Button } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| import { PRIMARY_PURPLE_DISABLED } from "../../../constants/stylesConstants"; | import { PRIMARY_PURPLE_DISABLED } from "../../../constants/stylesConstants"; | ||||
| export const ComponentContainer = styled.div``; | |||||
| export const ComponentContainer = styled(Box)``; | |||||
| export const PrimaryButtonStyled = styled(Button)` | export const PrimaryButtonStyled = styled(Button)` | ||||
| background-color: ${(props) => | background-color: ${(props) => |
| style={props.containerStyle} | style={props.containerStyle} | ||||
| className={props.className} | className={props.className} | ||||
| > | > | ||||
| <PrimaryButtonWithIconStyled sx={props.style} {...props.buttonProps}> | |||||
| <PrimaryButtonWithIconStyled sx={props.style} {...props.buttonProps} onClick={props.onClick}> | |||||
| <IconStyled style={props.iconStyle}>{props.icon}</IconStyled> | <IconStyled style={props.iconStyle}>{props.icon}</IconStyled> | ||||
| {props.children} | {props.children} | ||||
| </PrimaryButtonWithIconStyled> | </PrimaryButtonWithIconStyled> | ||||
| style: PropTypes.any, | style: PropTypes.any, | ||||
| iconStyle: PropTypes.any, | iconStyle: PropTypes.any, | ||||
| buttonProps: PropTypes.any, | buttonProps: PropTypes.any, | ||||
| onClick: PropTypes.func, | |||||
| }; | }; | ||||
| export default PrimaryButtonWithIcon; | export default PrimaryButtonWithIcon; |
| import { Box } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| import { Icon } from "../../Icon/Icon"; | import { Icon } from "../../Icon/Icon"; | ||||
| import { PrimaryButton } from "../PrimaryButton/PrimaryButton"; | import { PrimaryButton } from "../PrimaryButton/PrimaryButton"; | ||||
| export const ComponentContainer = styled.div``; | |||||
| export const ComponentContainer = styled(Box)``; | |||||
| export const PrimaryButtonWithIconStyled = styled(PrimaryButton)` | export const PrimaryButtonWithIconStyled = styled(PrimaryButton)` | ||||
| position: relative; | position: relative; |
| import { Checkbox, FormControlLabel } from "@mui/material"; | |||||
| import { Box, Checkbox, FormControlLabel } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ${props => props.fullWidth && (` | ${props => props.fullWidth && (` | ||||
| width: 100%; | width: 100%; | ||||
| display: flex; | display: flex; |
| import { FormLabel } from "@mui/material"; | |||||
| import { Box, FormLabel } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| display: flex; | display: flex; | ||||
| flex: 1; | flex: 1; | ||||
| justify-content: space-between; | justify-content: space-between; |
| const DropdownItem = (props) => { | const DropdownItem = (props) => { | ||||
| return ( | return ( | ||||
| <ComponentContainer> | |||||
| <ComponentContainer onClick={props.onClick}> | |||||
| <DropdownItemStyled> | <DropdownItemStyled> | ||||
| {props.children} | {props.children} | ||||
| </DropdownItemStyled> | </DropdownItemStyled> | ||||
| DropdownItem.propTypes = { | DropdownItem.propTypes = { | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| onClick: PropTypes.func, | |||||
| } | } | ||||
| export default DropdownItem; | export default DropdownItem; |
| import { Box } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ` | ` | ||||
| export const DropdownItemStyled = styled.div` | |||||
| export const DropdownItemStyled = styled(Box)` | |||||
| ` | ` |
| import PropTypes from "prop-types"; | import PropTypes from "prop-types"; | ||||
| const DropdownList = (props) => { | const DropdownList = (props) => { | ||||
| const [listShown, setListShown] = useState(true); | |||||
| const [listShown, setListShown] = useState(props.defaultOpen); | |||||
| return ( | return ( | ||||
| <ComponentContainer fullWidth={props.fullWidth}> | <ComponentContainer fullWidth={props.fullWidth}> | ||||
| <DropdownHeader> | <DropdownHeader> | ||||
| toggleIconClosed: PropTypes.node, | toggleIconClosed: PropTypes.node, | ||||
| children: PropTypes.node, | children: PropTypes.node, | ||||
| fullWidth: PropTypes.bool, | fullWidth: PropTypes.bool, | ||||
| defaultOpen: PropTypes.bool | |||||
| }; | }; | ||||
| DropdownList.defaultProps = { | DropdownList.defaultProps = { | ||||
| fullWidth: false, | fullWidth: false, | ||||
| defaultOpen: true | |||||
| }; | }; |
| import { Icon } from "@mui/material"; | |||||
| import { Box, Icon } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ` | ` | ||||
| export const IconStyled = styled(Icon)` | export const IconStyled = styled(Icon)` |
| import { TextField } from "@mui/material"; | |||||
| import { Box, TextField } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| const backgroundColor = `rgb(241, 241, 241)`; | const backgroundColor = `rgb(241, 241, 241)`; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| width: 100%; | width: 100%; | ||||
| padding-left: 0; | padding-left: 0; | ||||
| `; | `; |
| import { Box } from "@mui/material"; | |||||
| import styled from "styled-components"; | import styled from "styled-components"; | ||||
| import { Icon } from "../../Icon/Icon"; | import { Icon } from "../../Icon/Icon"; | ||||
| import { TextField } from "../TextField/TextField"; | import { TextField } from "../TextField/TextField"; | ||||
| export const ComponentContainer = styled.div` | |||||
| export const ComponentContainer = styled(Box)` | |||||
| ` | ` | ||||
| export const TextFieldStyled = styled(TextField)` | export const TextFieldStyled = styled(TextField)` |
| Link, | Link, | ||||
| Typography, | Typography, | ||||
| } from "@mui/material"; | } from "@mui/material"; | ||||
| import { LocationOn, LocationOnOutlined, Visibility, VisibilityOff } from "@mui/icons-material"; | |||||
| import { | |||||
| LocationOn, | |||||
| LocationOnOutlined, | |||||
| Visibility, | |||||
| VisibilityOff, | |||||
| } from "@mui/icons-material"; | |||||
| import Backdrop from "../../components/MUI/BackdropComponent"; | import Backdrop from "../../components/MUI/BackdropComponent"; | ||||
| import ErrorMessage from "../../components/MUI/ErrorMessageComponent"; | import ErrorMessage from "../../components/MUI/ErrorMessageComponent"; | ||||
| import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; | import { selectIsLoadingByActionType } from "../../store/selectors/loadingSelectors"; | ||||
| fullWidth | fullWidth | ||||
| /> | /> | ||||
| <TextField | <TextField | ||||
| name = "password" | |||||
| placeholder = {t("common.labelPassword")} | |||||
| margin = "normal" | |||||
| type = {showPassword ? "text" : "password"} | |||||
| value = {formik.values.password} | |||||
| onChange = {formik.handleChange} | |||||
| error = {formik.touched.password && Boolean(formik.errors.password)} | |||||
| helperText = {formik.touched.password && formik.errors.password} | |||||
| fullWidth = {true} | |||||
| InputProps = {{ | |||||
| endAdornment: ( | |||||
| name="password" | |||||
| placeholder={t("common.labelPassword")} | |||||
| margin="normal" | |||||
| type={showPassword ? "text" : "password"} | |||||
| value={formik.values.password} | |||||
| onChange={formik.handleChange} | |||||
| error={formik.touched.password && Boolean(formik.errors.password)} | |||||
| helperText={formik.touched.password && formik.errors.password} | |||||
| fullWidth={true} | |||||
| InputProps={{ | |||||
| endAdornment: ( | |||||
| <IconButton | <IconButton | ||||
| onClick={handleClickShowPassword} | onClick={handleClickShowPassword} | ||||
| onMouseDown={handleMouseDownPassword} | onMouseDown={handleMouseDownPassword} | ||||
| > | > | ||||
| {showPassword ? <Visibility /> : <VisibilityOff />} | {showPassword ? <Visibility /> : <VisibilityOff />} | ||||
| </IconButton> | </IconButton> | ||||
| ), | |||||
| }} | |||||
| ), | |||||
| }} | |||||
| /> | /> | ||||
| <DropdownList title="Naslov" toggleIconOpened={<Visibility/>} toggleIconClosed={<Visibility/>} dropdownIcon={<LocationOnOutlined/>} fullWidth={true}> | |||||
| {/* <DropdownList | |||||
| title="Naslov" | |||||
| toggleIconOpened={<Visibility />} | |||||
| toggleIconClosed={<VisibilityOff />} | |||||
| dropdownIcon={<LocationOnOutlined />} | |||||
| fullWidth | |||||
| defaultOpen={false} | |||||
| > | |||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| <DropdownItem> | <DropdownItem> | ||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124"/> | |||||
| <CheckBox fullWidth leftText="Kategorija" rightText="124" /> | |||||
| </DropdownItem> | </DropdownItem> | ||||
| </DropdownList> | |||||
| </DropdownList> */} | |||||
| <PrimaryButtonWithIcon | <PrimaryButtonWithIcon | ||||
| icon={<Visibility />} | icon={<Visibility />} |