chore: misc. design updates

This commit is contained in:
jinhojang6 2024-10-01 23:47:06 +09:00
parent c68dba4414
commit 19661fd619
5 changed files with 45 additions and 14 deletions

View File

@ -106,11 +106,21 @@ const DropdownHeader = styled.div<{ isExpanded: boolean }>`
align-items: center; align-items: center;
padding: 10px; padding: 10px;
cursor: pointer; cursor: pointer;
background-color: ${({ isExpanded }) => (isExpanded ? 'white' : 'black')};
color: ${({ isExpanded }) => (isExpanded ? 'black' : 'white')};
border: 1px solid white; border: 1px solid white;
border-left: none; border-left: none;
background-color: ${({ isExpanded }) => (isExpanded ? 'white' : 'black')};
color: ${({ isExpanded }) => (isExpanded ? 'black' : 'white')};
&:hover {
background-color: white;
color: black;
img {
filter: invert(100%);
}
}
` `
const Chevron = styled.span<{ isExpanded: boolean }>` const Chevron = styled.span<{ isExpanded: boolean }>`

View File

@ -135,6 +135,15 @@ const DropdownButton = styled.button<{ isOpen: boolean }>`
line-height: 20px; line-height: 20px;
letter-spacing: 0.14px; letter-spacing: 0.14px;
} }
&:hover {
background-color: white;
color: black;
img {
filter: invert(100%);
}
}
` `
const ChevronIconWrapper = styled.div<{ isOpen: boolean }>` const ChevronIconWrapper = styled.div<{ isOpen: boolean }>`

View File

@ -88,7 +88,7 @@ const OperatorDetails: React.FC<OperatorDetailsProps> = ({
<AttributeValue>{operator?.background}</AttributeValue> <AttributeValue>{operator?.background}</AttributeValue>
</AttributeItem> </AttributeItem>
</AttributesFirstGrid> </AttributesFirstGrid>
<AttributesSecondGrid> <AttributesFirstGrid>
<AttributeItem> <AttributeItem>
<AttributeLabel>Helmet</AttributeLabel> <AttributeLabel>Helmet</AttributeLabel>
<AttributeValue>{operator?.helmet}</AttributeValue> <AttributeValue>{operator?.helmet}</AttributeValue>
@ -97,11 +97,13 @@ const OperatorDetails: React.FC<OperatorDetailsProps> = ({
<AttributeLabel>Jacket</AttributeLabel> <AttributeLabel>Jacket</AttributeLabel>
<AttributeValue>{operator?.jacket}</AttributeValue> <AttributeValue>{operator?.jacket}</AttributeValue>
</AttributeItem> </AttributeItem>
</AttributesFirstGrid>
<AttributesFullGrid>
<AttributeItem> <AttributeItem>
<AttributeLabel>Skin</AttributeLabel> <AttributeLabel>Skin</AttributeLabel>
<AttributeValue>None</AttributeValue> <AttributeValue>None</AttributeValue>
</AttributeItem> </AttributeItem>
</AttributesSecondGrid> </AttributesFullGrid>
<DetailsList> <DetailsList>
{isIncripted && {isIncripted &&
@ -176,6 +178,11 @@ const Button = styled.button`
color: #fff; color: #fff;
font-size: 14px; font-size: 14px;
cursor: pointer; cursor: pointer;
&:hover {
background-color: white;
color: black;
}
` `
const OperatorTitle = styled.h1` const OperatorTitle = styled.h1`
@ -200,11 +207,11 @@ const AttributesFirstGrid = styled.div`
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
gap: 2px; gap: 2px;
margin-top: 24px; margin-top: 2px;
` `
const AttributesSecondGrid = styled(AttributesFirstGrid)` const AttributesFullGrid = styled(AttributesFirstGrid)`
grid-template-columns: repeat(3, 1fr); grid-template-columns: 1fr;
margin-top: 2px; margin-top: 2px;
` `
@ -230,6 +237,7 @@ const ArchetypeSection = styled.div`
background-color: var(--grey-900); background-color: var(--grey-900);
padding: 16px 8px; padding: 16px 8px;
margin-top: 24px; margin-top: 24px;
margin-bottom: 24px;
` `
const DetailsList = styled.div` const DetailsList = styled.div`

View File

@ -131,7 +131,9 @@ const DropdownContainer = styled.div`
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-top: 70px;
max-width: 911px;
margin: 70px auto 0 auto;
& > div:first-of-type { & > div:first-of-type {
border-left: 1px solid white; border-left: 1px solid white;

View File

@ -12,13 +12,15 @@ const ExploreOperator: React.FC<ExploreOperatorProps> = ({ id }) => {
const router = useRouter() const router = useRouter()
const handleGoBack = () => { const handleGoBack = () => {
// if router has history, go back, else go to home router.push('/')
if (router?.back) { // // if router has history, go back, else go to home
router.back() // if (router?.back) {
} else { // router.back()
router.push('/') // } else {
} // router.push('/')
// }
} }
return ( return (
<Container> <Container>
<GoBackButton aria-label="Share" onClick={handleGoBack}> <GoBackButton aria-label="Share" onClick={handleGoBack}>