Skip to content
Snippets Groups Projects
Commit 0663b219 authored by Rafael László's avatar Rafael László :speech_balloon:
Browse files

Profile modal skeleton

parent f856f849
Branches
No related tags found
2 merge requests!7update master to dev,!4Feature/profile
import { Button } from '@material-ui/core'; import { Button } from '@material-ui/core';
import React, { useState } from 'react'; import React, { useState } from 'react';
import { CustomModal } from './CustomModal'; import { ProfileModal } from './ProfileModal';
export const ProfileButton = () => { export const ProfileButton = () => {
const [isProfileModalOpen, setIsProfileModalOpen] = useState<boolean>(false); const [isProfileModalOpen, setIsProfileModalOpen] = useState<boolean>(false);
...@@ -14,13 +14,7 @@ export const ProfileButton = () => { ...@@ -14,13 +14,7 @@ export const ProfileButton = () => {
<Button variant="contained" color="primary" onClick={handleProfileModalOpen}> <Button variant="contained" color="primary" onClick={handleProfileModalOpen}>
Open Profile Open Profile
</Button> </Button>
<CustomModal <ProfileModal isOpen={isProfileModalOpen} setIsOpen={setIsProfileModalOpen} />
isOpen={isProfileModalOpen}
setIsOpen={setIsProfileModalOpen}
customStyle={{ backgroundColor: 'white', padding: '10px' }}
>
Modal content
</CustomModal>
</div> </div>
); );
}; };
......
import React, { Dispatch, SetStateAction } from 'react';
import { CustomModal } from './CustomModal';
type Dispatcher<S> = Dispatch<SetStateAction<S>>;
interface IProfileModalProps {
isOpen: boolean;
setIsOpen: Dispatcher<boolean>;
}
export const ProfileModal = ({ isOpen, setIsOpen }: IProfileModalProps) => {
const placeHolder = 'test text';
return (
<CustomModal
isOpen={isOpen}
setIsOpen={setIsOpen}
customStyle={{ backgroundColor: 'white', padding: '10px' }}
>
{placeHolder}
</CustomModal>
);
};
export default ProfileModal;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment