Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

38 기본 design color 변경 #40

Merged
merged 7 commits into from
Nov 10, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions src/components/common/FileFind/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,16 @@ type FileFindProps = {

export const FileFind: React.FC<FileFindProps> = ({ handleChangeFile, fileProps }) => (
<S.FileFindContainer>
{fileProps.filename != '' && fileProps.size != '' && fileProps.fileType != '' ? (
<S.FileFindTextBox placeholders={false}>
{'이름:' +
<S.FileFindTextBox>
{fileProps.filename != '' && fileProps.size != '' && fileProps.fileType != ''
? '이름:' +
fileProps.filename +
' / 크기:' +
fileProps.size +
' / 타입:' +
fileProps.fileType}
</S.FileFindTextBox>
) : (
<S.FileFindTextBox placeholders={true}>업로드 할 파일을 선택해주세요....</S.FileFindTextBox>
)}
fileProps.fileType
: '업로드 할 파일을 선택해주세요....'}
</S.FileFindTextBox>

<S.FileFindButton htmlFor="file">찾아보기</S.FileFindButton>
<input type={'file'} id="file" style={{ display: 'none' }} onChange={handleChangeFile} />
Expand Down
9 changes: 4 additions & 5 deletions src/components/common/FileFind/styled.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ export const FileFindContainer = styled.div`
margin-top: 20px;
`;

export const FileFindTextBox = styled.div<{ placeholders: boolean }>`
export const FileFindTextBox = styled.div`
border: 4px solid var(--color-border);
border-radius: 10px;
width: 45rem;
height: 4.2rem;
background-color: var(--color-text-primary);
color: ${(props) =>
props.placeholders ? 'var(--color-text-placeholder)' : ' var(--color-text-secondary)'};
background-color: var(--color-backgorund-black);
color: var(--color-text-placeholder);
display: flex;
align-items: center;
white-space: nowrap;
Expand All @@ -35,7 +34,7 @@ export const FileFindButton = styled.label`
display: flex;
align-items: center;
justify-content: center;
color: var(--color-text-secondary);
color: var(--color-text-primary);
font-size: 2rem;
font-weight: 700;
border-radius: 10px;
Expand Down
5 changes: 5 additions & 0 deletions src/components/common/PasswordInput/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import styled from '@emotion/styled';

export const PasswordInput = styled.input`
border: 4px solid var(--color-border);
background-color: var(--color-backgorund-black);
color: var(--color-text-placeholder);
border-radius: 10px;
outline: none;
width: 100%;
Expand All @@ -10,4 +12,7 @@ export const PasswordInput = styled.input`
font-size: 1.8rem;
font-weight: 700;
margin-top: 20px;
&::-webkit-input-placeholder {
color: var(--color-text-placeholder);
}
`;
2 changes: 1 addition & 1 deletion src/components/common/UpLoadButton/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ export const UpLoadButton = styled.input`
font-weight: 900;
background-color: var(--color-background-secondary);
margin-top: 30px;
color: var(--color-text-secondary);
color: var(--color-text-primary);
text-align: center;
`;
8 changes: 6 additions & 2 deletions src/pages/main/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { useNavigate } from 'react-router-dom';
import { toast } from 'react-toastify';
import { bindActionCreators } from 'redux';

// eslint-disable-next-line
import { CheckBox, PasswordInput, UpLoadButton, FileFind, Progress } from '../../components';
import { actionCreators } from '../../state';
import { getFileSize } from '../../utils';
Expand All @@ -15,8 +16,11 @@ export const MainPage: React.FC = () => {
const [typingCount, setTypingCount] = useState(0);
const [uploading, setUploading] = useState(true);
const [progressValue, serProgressValue] = useState(0);
// eslint-disable-next-line
const [retentionPeriod, setRetentionPeriod] = useState(false);
// eslint-disable-next-line
const [downloadCount, setDownloadCount] = useState(false);
// eslint-disable-next-line
const [passwordBoolean, setPasswordBoolean] = useState(false);
const [password, setPassword] = useState('');
const [fileProps, setFileProps] = useState({
Expand Down Expand Up @@ -113,7 +117,7 @@ export const MainPage: React.FC = () => {
<S.MainPageContainer>
{uploading ? (
<>
<S.MainPageCheckBoxSection>
{/* <S.MainPageCheckBoxSection>
<CheckBox
click={() => {
setRetentionPeriod(false);
Expand Down Expand Up @@ -141,7 +145,7 @@ export const MainPage: React.FC = () => {
isCheck={passwordBoolean}
label={'비밀번호'}
/>
</S.MainPageCheckBoxSection>
</S.MainPageCheckBoxSection> */}
{passwordBoolean ? (
<PasswordInput
onChange={(text) => {
Expand Down
9 changes: 5 additions & 4 deletions src/styles/globalStyle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,18 @@ export const globalStyle = css`
--color-text-primary: #ffffff;
--color-text-secondary: #25262e;
--color-text-tertiary: #8f95e0;
--color-text-placeholder: #757575;
--color-text-placeholder: #c8beac;

--color-backgorund-progressbar: #2d2d2d;

--color-check-true-background: #2ab514;
--color-check-true-background: #252728;
--color-check-true-icon: var(--color-text-primary);
--color-check-false-background: var(--color-text-primary);
--color-check-false-icon: #c0c0c0;
--color-check-false-background: #252728;
--color-check-false-icon: #252728;

--color-border: #757bab;
--color-background: #282a3a;
--color-backgorund-black: #252728;
--color-background-secondary: var(--color-border);
--color-background-tertiary: #2e2836;
--color-background-apicommand: #373c62cc;
Expand Down