Skip to content

Commit

Permalink
Merge pull request #334 from boostcampwm2023/feature/theme
Browse files Browse the repository at this point in the history
[FE] Theme 사용
  • Loading branch information
bananaba authored Dec 13, 2023
2 parents cb95739 + 785a480 commit 6a61cad
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 24 deletions.
7 changes: 3 additions & 4 deletions packages/client/src/entities/posts/ui/Post.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import { useEffect, useRef, useState } from 'react';
import { useLocation, useNavigate, useParams } from 'react-router-dom';
import { StarType } from 'shared/lib';
import { useCameraStore, useViewStore } from 'shared/store';
import { theme } from 'shared/styles';
import * as THREE from 'three';

interface PropsType {
Expand Down Expand Up @@ -90,9 +89,9 @@ const Label = styled.div`
width: fit-content;
max-width: 200px; // TODO: 수정 예정
text-align: center;
background-color: ${theme.colors.background.bdp01_80};
border: 1px solid ${theme.colors.stroke.sc};
color: ${theme.colors.text.secondary};
background-color: ${({ theme: { colors } }) => colors.background.bdp01_80};
border: ${({ theme: { colors } }) => colors.stroke.sc};
color: ${({ theme: { colors } }) => colors.text.secondary};
transform: translate3d(calc(-50%), calc(-250%), 0); // TODO: 수정 예정
overflow: hidden;
Expand Down
2 changes: 1 addition & 1 deletion packages/client/src/features/coachMarker/CoachButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ export default function CoachButton() {
}

const HelpCircleButton = styled(HelpCircleIcon)`
color: ${({ theme }) => theme.colors.text.secondary};
color: ${({ theme: { colors } }) => colors.text.secondary};
cursor: pointer;
`;
2 changes: 1 addition & 1 deletion packages/client/src/pages/Home/Home.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export default function Home() {
useEffect(() => {
const path = location.pathname.split('/');
if (path[1] === 'home' && path.length <= 2) setView('MAIN');
else if (path[1] === 'home' && path.length === 3) setView('MAIN');
else if (path[1] === 'home' && path.length === 3 && postId) setView('MAIN');
else if (path[1] === 'guest' && path.length <= 4) setView('MAIN');
else if (path[1] === 'search' && path.length <= 4) setView('MAIN');
}, [location]);
Expand Down
16 changes: 8 additions & 8 deletions packages/client/src/shared/ui/inputBar/InputBar.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from '@emotion/styled';
import { Body02ME, Body03ME, theme } from 'shared/styles';
import { Body02ME, Body03ME } from 'shared/styles';

interface PropsType extends React.InputHTMLAttributes<HTMLInputElement> {
label?: string;
Expand Down Expand Up @@ -41,19 +41,19 @@ const Input = styled.input`
height: 100%;
padding: 12px;
border-radius: 4px;
background-color: ${theme.colors.background.bdp03};
border: 1px solid ${theme.colors.stroke.default};
color: ${theme.colors.text.third};
background-color: ${({ theme: { colors } }) => colors.background.bdp03};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.default};
color: ${({ theme: { colors } }) => colors.text.third};
${Body03ME}
&:hover {
border: 1px solid ${theme.colors.stroke.sc};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.sc};
}
&:focus {
outline: none;
border: 1px solid ${theme.colors.stroke.focus};
color: ${theme.colors.text.secondary};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.focus};
color: ${({ theme: { colors } }) => colors.text.secondary};
}
`;

Expand All @@ -62,7 +62,7 @@ const LabelContainer = styled.div`
`;

const LabelText = styled.label`
color: ${theme.colors.text.secondary};
color: ${({ theme: { colors } }) => colors.text.secondary};
${Body02ME}
`;

Expand Down
20 changes: 10 additions & 10 deletions packages/client/src/shared/ui/textArea/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ const Section = styled.section<{ width: string; height: string }>`
${Body04Me}
width: ${({ width }) => width};
height: ${({ height }) => height};
background-color: ${theme.colors.background.bdp03};
color: ${theme.colors.text.third};
background-color: ${({ theme: { colors } }) => colors.background.bdp03};
color: ${({ theme: { colors } }) => colors.text.third};
border-radius: 4px;
display: flex;
padding: 16px;
Expand All @@ -92,7 +92,7 @@ const Tabs = styled.ul`
align-items: center;
.selected {
color: ${theme.colors.text.primary};
color: ${({ theme: { colors } }) => colors.text.primary};
font-size: large;
}
`;
Expand All @@ -104,14 +104,14 @@ const Tab = styled.div`
const TextInput = styled.textarea<{ css: SerializedStyles }>`
${({ css }) => css}
resize: none;
background-color: ${theme.colors.background.bdp03};
color: ${theme.colors.text.third};
background-color: ${({ theme: { colors } }) => colors.background.bdp03};
color: ${({ theme: { colors } }) => colors.text.third};
border: none;
height: 100%;
&:focus {
outline: none;
color: ${theme.colors.text.secondary};
color: ${({ theme: { colors } }) => colors.text.secondary};
}
`;

Expand All @@ -124,18 +124,18 @@ const LimitSpan = styled.span`
const Container = styled.div`
display: flex;
flex-direction: column;
border: 1px solid ${theme.colors.stroke.default};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.default};
border-radius: 4px;
padding: 8px;
height: 100%;
overflow: auto;
&:focus-within {
border: 1px solid ${theme.colors.stroke.focus};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.focus};
}
&:hover {
border: 1px solid ${theme.colors.stroke.focus};
border: 1px solid ${({ theme: { colors } }) => colors.stroke.focus};
}
`;

Expand All @@ -147,7 +147,7 @@ const Wrapper = styled.div<{ css: SerializedStyles }>`
padding: 8px;
margin-top: 9px;
margin-right: 9px;
color: ${theme.colors.text.secondary};
color: ${({ theme: { colors } }) => colors.text.secondary};
word-break: break-all;
& ol {
Expand Down

0 comments on commit 6a61cad

Please sign in to comment.