-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
90 additions
and
86 deletions.
There are no files selected for viewing
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,31 @@ | ||
.add_form_list > li .input_file_box {display : flex;} | ||
.add_form_list > li .input_file_box label {display : flex; align-items: center; justify-content: center; flex-direction: column; width: 282px; height: 282px; background-color: #F3F4F6; border-radius: 12px; cursor: pointer;} | ||
.add_form_list > li .input_file_box label > span {margin-top: 12px; color: #9CA3AF; font-size: 1.6rem; font-weight: 400; line-height: 1.625; } | ||
.add_form_list > li .input_file_box input {display: none;} | ||
.add_form_list > li .input_file_box .file_img_list > li {position: relative; overflow: hidden; width: 282px; height: 282px; margin-left: 24px; border-radius: 12px;} | ||
.add_form_list > li .input_file_box .file_img_list > li > .remove_btn {position: absolute; top: 12px; right: 12px; z-index: 2;} | ||
.add_form_list > li .input_file_box .file_img_list > li > img {width: 100%; height: 100%; object-fit: cover;} | ||
|
||
.limit_text {position: relative; z-index: -1; margin-top: -26px; color: #F74747; font-size: 1.6rem; line-height: 1.625; opacity: 0; transition: all 0.2s ease-in-out;} | ||
.limit_text.active {opacity: 1; margin-top: 16px; margin-bottom: -8px;} | ||
|
||
@media (max-width: 1200px) { | ||
.add_form_list > li .input_file_box label {width: 168px; height: 168px;} | ||
.add_form_list > li .input_file_box .file_img_list > li {width: 168px; height: 168px; margin-left: 10px;} | ||
.limit_text {width: 168px; white-space: nowrap; font-size: 1.4rem;} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.add_form_list > li .input_file_box {justify-content: space-between;} | ||
.add_form_list > li .input_file_box .file_add_wrap {position: relative; width: calc(50% - 5px); height: 0; padding-top: calc(50% - 5px);} | ||
.add_form_list > li .input_file_box label {position: absolute; top: 0; left: 0; width: 100%; height: 100%;} | ||
|
||
.add_form_list > li .input_file_box:has( .limit_text.active) .file_add_wrap {padding-top: calc(50% + 15px);} | ||
.add_form_list > li .input_file_box:has( .limit_text.active) label {height: calc(100% - 20px);} | ||
|
||
.add_form_list > li .input_file_box .file_img_list {position: relative; width: calc(50% - 5px); height: 0; padding-top: calc(50% - 5px);} | ||
.add_form_list > li .input_file_box .file_img_list > li {position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin-left: 0;} | ||
|
||
.limit_text {margin-top: -50px;} | ||
.limit_text.active {margin-top: -13px;} | ||
} |
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,8 @@ | ||
.add_form_list > li .input_box input[type="text"] {width: 100%; height: 56px; padding: 0 24px; background-color: #F3F4F6; border-radius: 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.625;} | ||
.add_form_list > li .input_box input[type="text"]::placeholder {color: #9CA3AF;} | ||
.add_form_list > li .input_box textarea {width: 100%; height: 282px; padding: 16px 24px; background-color: #F3F4F6; border-radius: 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.625; resize: none;} | ||
.add_form_list > li .input_box textarea::placeholder {color: #9CA3AF;} | ||
|
||
@media (max-width: 1200px) { | ||
.add_form_list > li + li {margin-top: 24px;} | ||
} |
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,22 @@ | ||
import FormLabel from "./../components/FormLabel"; | ||
import FileInput from "./../components/FileInput"; | ||
import "./FormLabel.css"; | ||
import "./FormItem.css"; | ||
|
||
const FormItem = ({ labelName, type, id, name, className, value, onChange, placeholder }) => { | ||
return ( | ||
<li> | ||
<FormLabel htmlFor={id} labelName={labelName} /> | ||
<div className={type !== "file" ? `input_box` : `input_box input_file_box`}> | ||
{type === "textarea" ? ( | ||
<textarea type={type} id={id} name={name} className={className} value={value} onChange={onChange} placeholder={placeholder}></textarea> | ||
) : type === "file" ? ( | ||
<FileInput name={name} value={value} onChange={onChange} /> | ||
) : ( | ||
<input type={type} id={id} name={name} className={className} value={value} onChange={onChange} placeholder={placeholder} /> | ||
)} | ||
</div> | ||
</li> | ||
); | ||
}; | ||
export default FormItem; |
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 @@ | ||
.add_form_list > li .title {display: block; margin-bottom: 16px; font-size: 1.8rem; font-weight: 700; line-height: 1.4444;} |
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,8 @@ | ||
const FormLabel = ({ htmlFor, labelName }) => { | ||
return ( | ||
<label htmlFor={htmlFor} className="title"> | ||
{labelName} | ||
</label> | ||
); | ||
}; | ||
export default FormLabel; |
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 |
---|---|---|
@@ -1,46 +1,9 @@ | ||
.add_submit {margin-left: auto;} | ||
.add_form_list > li + li {margin-top: 32px;} | ||
.add_form_list > li .title {display: block; margin-bottom: 16px; font-size: 1.8rem; font-weight: 700; line-height: 1.4444;} | ||
.add_form_list > li .input_box input[type="text"] {width: 100%; height: 56px; padding: 0 24px; background-color: #F3F4F6; border-radius: 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.625;} | ||
.add_form_list > li .input_box input[type="text"]::placeholder {color: #9CA3AF;} | ||
.add_form_list > li .input_box textarea {width: 100%; height: 282px; padding: 16px 24px; background-color: #F3F4F6; border-radius: 12px; font-size: 1.6rem; font-weight: 400; line-height: 1.625; resize: none;} | ||
.add_form_list > li .input_box textarea::placeholder {color: #9CA3AF;} | ||
|
||
.tag_list {display : flex; flex-wrap: wrap; gap:12px; margin-top: 14px; } | ||
.tag_list > li {display : flex; align-items: center; padding: 6px 16px; background-color: #F3F4F6; border-radius: 50px; transition: all 0.2s; } | ||
.tag_list > li > span {font-size: 1.6rem; font-weight: 400; line-height: 1.625;} | ||
.tag_list > li > .remove {margin-left: 8px;} | ||
.tag_list > li:has( > .remove:hover ) {background-color: #E5E7EB;} | ||
|
||
.add_form_list > li .input_file_box {display : flex;} | ||
.add_form_list > li .input_file_box label {display : flex; align-items: center; justify-content: center; flex-direction: column; width: 282px; height: 282px; background-color: #F3F4F6; border-radius: 12px; cursor: pointer;} | ||
.add_form_list > li .input_file_box label > span {margin-top: 12px; color: #9CA3AF; font-size: 1.6rem; font-weight: 400; line-height: 1.625; } | ||
.add_form_list > li .input_file_box input {display: none;} | ||
.add_form_list > li .input_file_box .file_img_list > li {position: relative; overflow: hidden; width: 282px; height: 282px; margin-left: 24px; border-radius: 12px;} | ||
.add_form_list > li .input_file_box .file_img_list > li > .remove_btn {position: absolute; top: 12px; right: 12px; z-index: 2;} | ||
.add_form_list > li .input_file_box .file_img_list > li > img {width: 100%; height: 100%; object-fit: cover;} | ||
|
||
.limit_text {position: relative; z-index: -1; margin-top: -26px; color: #F74747; font-size: 1.6rem; line-height: 1.625; opacity: 0; transition: all 0.2s ease-in-out;} | ||
.limit_text.active {opacity: 1; margin-top: 16px; margin-bottom: -8px;} | ||
|
||
@media (max-width: 1200px) { | ||
.add_form_list > li + li {margin-top: 24px;} | ||
.add_form_list > li .input_file_box label {width: 168px; height: 168px;} | ||
.add_form_list > li .input_file_box .file_img_list > li {width: 168px; height: 168px; margin-left: 10px;} | ||
.limit_text {width: 168px; white-space: nowrap; font-size: 1.4rem;} | ||
} | ||
|
||
@media (max-width: 768px) { | ||
.add_form_list > li .input_file_box {justify-content: space-between;} | ||
.add_form_list > li .input_file_box .file_add_wrap {position: relative; width: calc(50% - 5px); height: 0; padding-top: calc(50% - 5px);} | ||
.add_form_list > li .input_file_box label {position: absolute; top: 0; left: 0; width: 100%; height: 100%;} | ||
|
||
.add_form_list > li .input_file_box:has( .limit_text.active) .file_add_wrap {padding-top: calc(50% + 15px);} | ||
.add_form_list > li .input_file_box:has( .limit_text.active) label {height: calc(100% - 20px);} | ||
|
||
.add_form_list > li .input_file_box .file_img_list {position: relative; width: calc(50% - 5px); height: 0; padding-top: calc(50% - 5px);} | ||
.add_form_list > li .input_file_box .file_img_list > li {position: absolute; top: 0; left: 0; width: 100%; height: 100%; margin-left: 0;} | ||
|
||
.limit_text {margin-top: -50px;} | ||
.limit_text.active {margin-top: -13px;} | ||
|
||
} |
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