-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
37 changed files
with
818 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
28 changes: 0 additions & 28 deletions
28
ssh-web/src/components/atoms/ProfileIcon/ProfileIcon.styles.ts
This file was deleted.
Oops, something went wrong.
18 changes: 0 additions & 18 deletions
18
ssh-web/src/components/atoms/ProfileIcon/ProfileIcon.types.ts
This file was deleted.
Oops, something went wrong.
Binary file not shown.
20 changes: 0 additions & 20 deletions
20
ssh-web/src/components/atoms/ProfileIcon/index.stories.tsx
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
3 changes: 3 additions & 0 deletions
3
ssh-web/src/components/molecules/AddPromiseCard/AddPromiseCard.types.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export interface AddPromiseCardProps { | ||
handleModal: () => void; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import React from 'react'; | ||
import { Typography } from '../../atoms/Typography'; | ||
import { AddPromiseCardProps } from './AddPromiseCard.types'; | ||
|
||
export const AddPromiseCard = ({ handleModal }: AddPromiseCardProps) => { | ||
return ( | ||
<div className="flex justify-center cursor-pointer"> | ||
<div | ||
className="flex flex-col p-4 bg-primary-100 items-center w-32 h-48 rounded-lg shadow-md opacity-65 hover:opacity-100 hover:bg-primary-200 transition-opacity duration-300" | ||
onClick={handleModal} | ||
> | ||
<div className="w-24 h-24 bg-secondary-300 rounded-lg flex items-center justify-center"> | ||
<span className="text-lg text-secondary-700">+</span> | ||
</div> | ||
<div className="text-center"> | ||
<Typography color="dark" size="sm" classNameStyles="mt-4 text-center"> | ||
약속 요청하기 | ||
</Typography> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; |
12 changes: 12 additions & 0 deletions
12
ssh-web/src/components/molecules/PromiseItem/PromiseItem.styles.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { tv } from 'tailwind-variants'; | ||
|
||
export const cardStyle = tv({ | ||
base: 'flex flex-col p-4 bg-primary-100 items-center rounded-lg shadow-md relative hover:bg-primary-200 transition duration-300', | ||
variants: { | ||
size: { | ||
M: 'w-32 h-48', | ||
T: 'w-32 h-48', | ||
D: 'w-32 h-48', | ||
}, | ||
}, | ||
}); |
7 changes: 7 additions & 0 deletions
7
ssh-web/src/components/molecules/PromiseItem/PromiseItem.types.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { IPromiseLogs } from '../../../interfaces/promiseTicketInterface'; | ||
|
||
export interface PromiseItemProps { | ||
handleModal: (log: IPromiseLogs) => void; | ||
isConfirm: boolean; | ||
log: IPromiseLogs; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React from 'react'; | ||
import { useRecoilValue } from 'recoil'; | ||
import { EResize } from '../../../themes/themeBase'; | ||
import { Typography } from '../../atoms/Typography'; | ||
import { cardStyle } from './PromiseItem.styles'; | ||
import { PromiseItemProps } from './PromiseItem.types'; | ||
import stemp from './stemp.png'; | ||
import { resizeState } from '../../../atoms/resize'; | ||
import defaultImg from './../../organisms/PromiseDetailModal/promiseImg.png'; | ||
|
||
export const PromiseItem = ({ | ||
handleModal, | ||
isConfirm, | ||
log, | ||
}: PromiseItemProps) => { | ||
const size = useRecoilValue<EResize>(resizeState); | ||
return ( | ||
<div className="flex justify-center cursor-pointer w-full"> | ||
<div | ||
className={cardStyle({ size })} | ||
onClick={() => { | ||
handleModal(log); | ||
}} | ||
> | ||
<div className="w-24 h-24 rounded-lg bg-cover bg-center relative"> | ||
{' '} | ||
{isConfirm && ( | ||
<> | ||
<div className="absolute bg-black opacity-35 rounded-lg w-24 h-24"></div> | ||
<img className="absolute w-24 h-24 opacity-100" src={stemp}></img> | ||
</> | ||
)} | ||
<img | ||
src={isConfirm ? log.imageUrl : defaultImg} | ||
className="w-full h-full bg-red-600 bg-opacity-50 flex items-center justify-center rounded-lg" | ||
/> | ||
</div> | ||
<Typography | ||
color="primary" | ||
size="sm" | ||
weight="semibold" | ||
classNameStyles="mt-4 text-center" | ||
> | ||
{log.description} | ||
</Typography> | ||
</div> | ||
</div> | ||
); | ||
}; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
ssh-web/src/components/organisms/AddPromiseModal/AddPromiseModal.types.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export interface AddPromiseModalProps { | ||
countTicket: number; | ||
onUpload: () => void; | ||
} |
75 changes: 75 additions & 0 deletions
75
ssh-web/src/components/organisms/AddPromiseModal/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
import React from 'react'; | ||
import { Button } from '../../atoms/Button'; | ||
import { Typography } from '../../atoms/Typography'; | ||
import { AddPromiseModalProps } from './AddPromiseModal.types'; | ||
|
||
export const AddPromiseModal = ({ | ||
countTicket, | ||
onUpload, | ||
}: AddPromiseModalProps) => { | ||
if (countTicket === 0) { | ||
return ( | ||
<div className="flex flex-col align-middle text-center py-4"> | ||
<Typography | ||
color="dark" | ||
size="2xl" | ||
weight="bold" | ||
classNameStyles="my-4" | ||
> | ||
보유한 약속권이 없어요! | ||
</Typography> | ||
<Button fullWidth={true} onClick={onUpload} classNameStyles="my-4"> | ||
확인 | ||
</Button> | ||
</div> | ||
); | ||
} | ||
|
||
return ( | ||
<div className="w-[100%] h-[100%] flex justify-center"> | ||
<div className="flex flex-col items-center align-middle w-[100%] max-w-[24rem]"> | ||
<img | ||
src={process.env.PUBLIC_URL + 'assets/images/common/promiseImg.png'} | ||
className="rounded-2xl shadow-lg w-[90%] max-w-[24rem]" | ||
/> | ||
<Typography | ||
color="dark" | ||
size="4xl" | ||
weight="bold" | ||
classNameStyles="text-center mt-2" | ||
> | ||
약속 | ||
</Typography> | ||
<textarea className="rounded-lg mt-2 w-[100%] h-[6rem] shadow-lg border-secondary-800 p-2 resize-none"></textarea> | ||
<Typography | ||
size="2xl" | ||
color="dark" | ||
weight="semibold" | ||
classNameStyles="text-center mt-4" | ||
> | ||
하기를 부모님과{' '} | ||
<Typography | ||
size="2xl" | ||
color="primary" | ||
weight="semibold" | ||
classNameStyles="text-center inline" | ||
> | ||
약속 | ||
</Typography> | ||
해요 | ||
</Typography> | ||
<Button | ||
color="primary" | ||
size="md" | ||
fullWidth={true} | ||
classNameStyles="mt-4" | ||
onClick={onUpload} | ||
> | ||
<Typography color="light" weight="bold" size="xl"> | ||
약속하기 | ||
</Typography> | ||
</Button> | ||
</div> | ||
</div> | ||
); | ||
}; |
6 changes: 6 additions & 0 deletions
6
ssh-web/src/components/organisms/ConfirmPromiseModal/ConfirmPromiseModal.types.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import { IPromiseLogs } from '../../../interfaces/promiseTicketInterface'; | ||
|
||
export interface ConfirmPromiseModalProps { | ||
log: IPromiseLogs | null; | ||
onUpload: (id: number) => void; | ||
} |
Oops, something went wrong.