-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feDev' into fe/feat/ErrProcess#447
- Loading branch information
Showing
34 changed files
with
1,032 additions
and
105 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
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.
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.
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.
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
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
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,96 @@ | ||
import React,{useState} from "react"; | ||
import { styled } from "styled-components"; | ||
import { useSelector } from "react-redux"; | ||
import tokens from "../../styles/tokens.json"; | ||
import BRONZE from "../../assets/images/icons/tier/bronze.svg" | ||
import SILVER from "../../assets/images/icons/tier/silver.svg"; | ||
import GOLD from "../../assets/images/icons/tier/gold.svg"; | ||
import PLATINUM from "../../assets/images/icons/tier/platinum.svg"; | ||
import DIAMOND from "../../assets/images/icons/tier/diamond.svg"; | ||
|
||
const globalTokens = tokens.global; | ||
|
||
const TierContainer = styled.div` | ||
position: relative; | ||
` | ||
const TierImage = styled.img` | ||
height: 25px; | ||
object-fit: contain; | ||
margin-top: ${globalTokens.Spacing4.value}px; | ||
` | ||
const ModalBody = styled.div` | ||
position: absolute; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
left: 180%; | ||
top: -15px; | ||
width: 270px; | ||
height: 180px; | ||
border: ${globalTokens.ThinHeight.value}px solid ${globalTokens.LightGray.value}; | ||
border-radius: ${globalTokens.BigRadius.value}px; | ||
color: ${(props)=>props.isDark ? globalTokens.White.value : globalTokens.Black.value}; | ||
background-color: ${(props) => | ||
props.isDark ? globalTokens.Black.value : globalTokens.White.value}; | ||
padding: ${globalTokens.Spacing12.value}px; | ||
z-index: 1; | ||
` | ||
const ModalItem = styled.div` | ||
height: 35px; | ||
width: 100%; | ||
display: flex; | ||
align-items: center; | ||
gap: ${globalTokens.Spacing8.value}px; | ||
` | ||
const TierName = styled.span` | ||
font-size: ${globalTokens.BodyText.value}px; | ||
width: 80px; | ||
` | ||
const TierDescription = styled.span` | ||
font-size: ${globalTokens.SmallText.value}px; | ||
font-weight: 500; | ||
margin-left: ${globalTokens.Spacing4.value}px; | ||
` | ||
|
||
export default function Tier({ tier }) { | ||
const tiers = { BRONZE, SILVER, GOLD, PLATINUM, DIAMOND }; | ||
const isDark = useSelector((state) => state.uiSetting.isDark); | ||
const [isOpen, setIsOpen] = useState(false) | ||
const blurHandler = () => { | ||
setIsOpen(false) | ||
} | ||
return ( | ||
<TierContainer> | ||
<button onClick={()=>setIsOpen(!isOpen)} onBlur={blurHandler}> | ||
<TierImage src={tiers[tier]}/> | ||
</button> | ||
{isOpen&& | ||
<ModalBody isDark={isDark}> | ||
<ModalItem> | ||
<TierImage src={BRONZE} /> | ||
<TierName>Bronze</TierName> | ||
</ModalItem> | ||
<ModalItem> | ||
<TierImage src={SILVER} /> | ||
<TierName>Silver</TierName> | ||
<TierDescription>๋์ ํฌ์ธํธ 100 ์ด์</TierDescription> | ||
</ModalItem> | ||
<ModalItem> | ||
<TierImage src={GOLD} /> | ||
<TierName>Gold</TierName> | ||
<TierDescription>๋์ ํฌ์ธํธ 1000 ์ด์</TierDescription> | ||
</ModalItem> | ||
<ModalItem> | ||
<TierImage src={PLATINUM} /> | ||
<TierName>Platinum</TierName> | ||
<TierDescription>๋์ ํฌ์ธํธ 3000 ์ด์</TierDescription> | ||
</ModalItem> | ||
<ModalItem> | ||
<TierImage src={DIAMOND} /> | ||
<TierName>Diamond</TierName> | ||
<TierDescription>๋์ ํฌ์ธํธ 10000 ์ด์</TierDescription> | ||
</ModalItem> | ||
</ModalBody>} | ||
</TierContainer> | ||
); | ||
} |
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
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, { useState } from 'react'; | ||
import { DropdownButton, DropdownButtonIcon, DropdownTextTypo, DropdownWrapper, ReceiptDropdownContainer } from '../receiptPage/ReceiptDropdown.style'; | ||
import { useSelector } from 'react-redux'; | ||
import { styled } from 'styled-components'; | ||
import { TextButton } from '../../atoms/buttons/Buttons'; | ||
import { BodyTextTypo } from '../../atoms/typographys/Typographys'; | ||
import arrowUp from '../../assets/images/icons/arrow/subscribe_arrow_up.svg'; | ||
import arrowDown from '../../assets/images/icons/arrow/subscribe_arrow_down.svg'; | ||
import tokens from '../../styles/tokens.json'; | ||
|
||
const globalTokens = tokens.global; | ||
|
||
const IncomeDropdownWrapper = styled(DropdownWrapper)` | ||
display: flex; | ||
flex-direction: row; | ||
justify-content: start; | ||
align-items: center; | ||
` | ||
const IncomeDropdownButton = styled(DropdownButton)` | ||
width: 100px; | ||
` | ||
const IncomeDropdownUnitTypo = styled(BodyTextTypo)` | ||
margin: ${globalTokens.Spacing4.value}px ${globalTokens.Spacing8.value}px ${globalTokens.Spacing4.value}px ${globalTokens.Spacing4.value}px; | ||
` | ||
|
||
const IncomeCategory = ({year, setYear, month, setMonth}) => { | ||
const isDark = useSelector(state=>state.uiSetting.isDark); | ||
const [isYearDropdownOpen, setIsYearDropdownOpen] = useState(false); | ||
const [isMonthDropdownOpen, setIsMonthDropdownOpen] = useState(false); | ||
|
||
return ( | ||
<ReceiptDropdownContainer> | ||
<IncomeDropdownWrapper> | ||
<IncomeDropdownButton isDark={isDark}> | ||
<DropdownTextTypo isDark={isDark}>{year}</DropdownTextTypo> | ||
<DropdownButtonIcon src={isYearDropdownOpen?arrowUp:arrowDown}/> | ||
</IncomeDropdownButton> | ||
<IncomeDropdownUnitTypo isDark={isDark}>๋ </IncomeDropdownUnitTypo> | ||
<IncomeDropdownButton isDark={isDark}> | ||
<DropdownTextTypo isDark={isDark}>{month}</DropdownTextTypo> | ||
<DropdownButtonIcon src={isMonthDropdownOpen?arrowUp:arrowDown}/> | ||
</IncomeDropdownButton> | ||
<IncomeDropdownUnitTypo isDark={isDark}>์</IncomeDropdownUnitTypo> | ||
</IncomeDropdownWrapper> | ||
</ReceiptDropdownContainer> | ||
); | ||
}; | ||
|
||
export default IncomeCategory; |
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,36 @@ | ||
import React from 'react'; | ||
import tokens from '../../styles/tokens.json'; | ||
import { styled } from 'styled-components'; | ||
import { IncomeAmountTypo, IncomeItemContainer, IncomeTitleTypo } from './IncomeItem'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
const globalTokens = tokens.global; | ||
|
||
export const IncomeHeadContainer = styled(IncomeItemContainer)` | ||
background-color: ${props=>props.isDark?globalTokens.Black.value:globalTokens.Background.value}; | ||
border: none; | ||
` | ||
export const IncomeTitleHeadContainer = styled(IncomeTitleTypo)` | ||
text-align: center; | ||
color: ${props=>props.isDark?globalTokens.LightGray.value:globalTokens.Gray.value}; | ||
font-weight: 400; | ||
` | ||
export const IncomeAmountHeadTypo = styled(IncomeAmountTypo)` | ||
text-align: center; | ||
color: ${props=>props.isDark?globalTokens.LightGray.value:globalTokens.Gray.value}; | ||
` | ||
|
||
const IncomeHeader = () => { | ||
const isDark = useSelector(state=>state.uiSetting.isDark); | ||
|
||
return ( | ||
<IncomeHeadContainer isDark={isDark}> | ||
<IncomeTitleHeadContainer isDark={isDark}>๊ฐ์๋ช </IncomeTitleHeadContainer> | ||
<IncomeAmountHeadTypo isDark={isDark}>๋์ ํ๋งค ๊ธ์ก</IncomeAmountHeadTypo> | ||
<IncomeAmountHeadTypo isDark={isDark}>๋์ ํ๋ถ ๊ธ์ก</IncomeAmountHeadTypo> | ||
<IncomeAmountHeadTypo isDark={isDark}>์ค์ ์ด์ค</IncomeAmountHeadTypo> | ||
</IncomeHeadContainer> | ||
); | ||
}; | ||
|
||
export default IncomeHeader; |
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,29 @@ | ||
import React from 'react'; | ||
import { styled } from 'styled-components'; | ||
import { ReceiptAmountTypo, ReceiptGrayTypo, ReceiptItemContainer, ReceiptTitleTypo } from '../receiptPage/ReceiptItem.style'; | ||
import { useSelector } from 'react-redux'; | ||
|
||
export const IncomeItemContainer = styled(ReceiptItemContainer)` | ||
` | ||
export const IncomeGrayTypo = styled(ReceiptGrayTypo)` | ||
` | ||
export const IncomeTitleTypo = styled(ReceiptTitleTypo)` | ||
` | ||
export const IncomeAmountTypo = styled(ReceiptAmountTypo)` | ||
width: 130px; | ||
` | ||
|
||
const IncomeItem = ({item}) => { | ||
const isDark = useSelector(state=>state.uiSetting.isDark); | ||
|
||
return ( | ||
<IncomeItemContainer isDark={isDark}> | ||
<IncomeTitleTypo isDark={isDark}>{item.videoName}</IncomeTitleTypo> | ||
<IncomeAmountTypo isDark={isDark}>{item.totalSaleAmount}์</IncomeAmountTypo> | ||
<IncomeAmountTypo isDark={isDark}>{item.refundAmount}์</IncomeAmountTypo> | ||
<IncomeAmountTypo isDark={isDark}>{item.totalSaleAmount-item.refundAmount}์</IncomeAmountTypo> | ||
</IncomeItemContainer> | ||
); | ||
}; | ||
|
||
export default IncomeItem; |
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
Oops, something went wrong.