Skip to content
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
8 changes: 4 additions & 4 deletions src/components/button/arrow-button.jsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import styled from "styled-components";
import arrowLeftImg from "../../assets/ic-chevron-left.svg";
import arrowRightImg from "../../assets/ic-chevron-right.svg";
import arrowLeftImage from "../../assets/ic-chevron-left.svg";
import arrowRightImage from "../../assets/ic-chevron-right.svg";
import Colors from "../color/colors";
import ARROW_BUTTON_DIRECTION from "./arrow-button-direction";

const arrowImg = {
[ARROW_BUTTON_DIRECTION.left]: arrowLeftImg,
[ARROW_BUTTON_DIRECTION.right]: arrowRightImg,
[ARROW_BUTTON_DIRECTION.left]: arrowLeftImage,
[ARROW_BUTTON_DIRECTION.right]: arrowRightImage,
};

const StyledArrowButton = styled.button`
Expand Down
4 changes: 2 additions & 2 deletions src/components/header/header.jsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import styled from "styled-components";
import logoImg from "../../assets/logo.svg";
import logoImage from "../../assets/logo.svg";
import { media } from "../../utils/media";

const HeaderContent = styled.div`
Expand Down Expand Up @@ -27,7 +27,7 @@ function Header({ className, children }) {
return (
<StyledHeader className={className}>
<HeaderContent>
<img src={logoImg} alt="로고" />
<img src={logoImage} alt="로고" />
<div>{children}</div>
</HeaderContent>
</StyledHeader>
Expand Down
4 changes: 2 additions & 2 deletions src/components/modal/modal.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { createPortal } from "react-dom";
import styled, { css } from "styled-components";
import defaultProfileImg from "../../assets/ic-person.svg";
import defaultProfileImage from "../../assets/ic-person.svg";
import { useModal } from "../../hooks/use-modal";
import { formatDate } from "../../utils/formatter";
import Badge from "../badge/badge";
Expand Down Expand Up @@ -40,7 +40,7 @@ const DefaultProfileImage = styled.div`
`;

function ProfileImage({ profileImg }) {
const img = <img src={profileImg ?? defaultProfileImg} alt="프로필 사진" />;
const img = <img src={profileImg ?? defaultProfileImage} alt="프로필 사진" />;
return profileImg ? (
<UserProfileImage>{img}</UserProfileImage>
) : (
Expand Down
6 changes: 3 additions & 3 deletions src/components/text-field/dropdown-input/dropdown-input.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";
import arrowDownImg from "../../../assets/ic-chevron-down.svg";
import arrowUpImg from "../../../assets/ic-chevron-up.svg";
import arrowDownImage from "../../../assets/ic-chevron-down.svg";
import arrowUpImage from "../../../assets/ic-chevron-up.svg";
import { useDropdown } from "../../../hooks/use-dropdown";
import INPUT_STYLES from "../input-styles";
import Dropdown from "./dropdown";
Expand Down Expand Up @@ -117,7 +117,7 @@ function DropdownInput({
<Text value={value} placeholder={placeholder} />
<Icon>
<img
src={showsDropdown ? arrowUpImg : arrowDownImg}
src={showsDropdown ? arrowUpImage : arrowDownImage}
alt="Dropdown 화살표"
/>
</Icon>
Expand Down
10 changes: 5 additions & 5 deletions src/components/text-field/text-field.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DropdownInput from "./dropdown-input/dropdown-input";
import TEXT_FIELD_TYPE from "./text-field-type";
import TextInput from "./text-input/text-input";

const StyledInputTextField = styled.div`
const StyledTextField = styled.div`
display: flex;
flex-direction: column;
gap: 4px;
Expand All @@ -18,17 +18,17 @@ const ErrorMessage = styled.p`
color: ${Colors.error};
`;

function InputTextField({ type, error, dropdownId, ...props }) {
function TextField({ type, error, dropdownId, ...props }) {
return (
<StyledInputTextField>
<StyledTextField>
{type === TEXT_FIELD_TYPE.input ? (
<TextInput error={error} {...props} />
) : (
<DropdownInput dropdownId={dropdownId} error={error} {...props} />
)}
{error && <ErrorMessage>{error}</ErrorMessage>}
</StyledInputTextField>
</StyledTextField>
);
}

export default InputTextField;
export default TextField;
8 changes: 4 additions & 4 deletions src/components/toast/toast.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled from "styled-components";
import checkImg from "../../assets/ic-check-circle-green.svg";
import closeImg from "../../assets/ic-xmark.svg";
import checkImage from "../../assets/ic-check-circle-green.svg";
import closeImage from "../../assets/ic-xmark.svg";

const StyledToast = styled.div`
background-color: rgba(0, 0, 0, 0.8);
Expand Down Expand Up @@ -60,11 +60,11 @@ function Toast({ message, onDismiss }) {
return (
<StyledToast>
<Icon>
<img src={checkImg} alt="확인" />
<img src={checkImage} alt="확인" />
</Icon>
<p>{message}</p>
<IconButton as="button" onClick={onDismiss}>
<img src={closeImg} alt="닫기" />
<img src={closeImage} alt="닫기" />
</IconButton>
</StyledToast>
);
Expand Down
22 changes: 11 additions & 11 deletions src/pages/test-page.jsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { useState } from "react";
import styled from "styled-components";
import smileAddImg from "../assets/ic-face-smile-add.svg";
import smileAddImage from "../assets/ic-face-smile-add.svg";
import Badge from "../components/badge/badge";
import BADGE_TYPE from "../components/badge/badge-type";
import EmojiBadge from "../components/badge/emoji-badge";
Expand Down Expand Up @@ -44,11 +44,11 @@ function TestPage() {

const handleToastClick = () => setShowsToast(true);
const handleToastDismiss = () => setShowsToast(false);

/* Modal */
const { showsModal, setShowsModal } = useModal();
const handleModalClick = () => setShowsModal(true);

return (
<div
style={{
Expand Down Expand Up @@ -84,33 +84,33 @@ function TestPage() {
<OutlinedButton
size={BUTTON_SIZE.medium}
title="Hello"
icon={smileAddImg}
icon={smileAddImage}
/>
<OutlinedButton
size={BUTTON_SIZE.small}
title="Hello"
icon={smileAddImg}
icon={smileAddImage}
/>
<OutlinedButton
size={BUTTON_SIZE.extraSmall}
title="Hello"
icon={smileAddImg}
icon={smileAddImage}
/>
<OutlinedButton
size={BUTTON_SIZE.extraSmall}
title="Hello"
disabled
icon={smileAddImg}
icon={smileAddImage}
/>
</div>
<div style={{ display: "flex", alignItems: "center", gap: 16 }}>
<OutlinedButton size={BUTTON_SIZE.medium} icon={smileAddImg} />
<OutlinedButton size={BUTTON_SIZE.small} icon={smileAddImg} />
<OutlinedButton size={BUTTON_SIZE.extraSmall} icon={smileAddImg} />
<OutlinedButton size={BUTTON_SIZE.medium} icon={smileAddImage} />
<OutlinedButton size={BUTTON_SIZE.small} icon={smileAddImage} />
<OutlinedButton size={BUTTON_SIZE.extraSmall} icon={smileAddImage} />
<OutlinedButton
size={BUTTON_SIZE.extraSmall}
disabled
icon={smileAddImg}
icon={smileAddImage}
/>
</div>
<div style={{ display: "flex", alignItems: "center", gap: 16 }}>
Expand Down