From 14e266f7cbdb4bddfc4ee5274d27cf9642ea79bb Mon Sep 17 00:00:00 2001 From: BFlat Date: Sun, 31 Dec 2023 12:51:24 +0700 Subject: [PATCH 1/3] update gaps for form fields, removed unnecessary divs --- .../components/common/TempInput/Input.scss | 7 ++ .../components/common/TempInput/TempInput.tsx | 3 +- .../components/common/TempSelect/Select.scss | 7 ++ .../common/TempSelect/TempSelect.tsx | 3 +- .../common/TempTextArea/TempTextArea.tsx | 5 +- .../common/TempTextArea/TextArea.scss | 7 ++ .../view/pages/upload/UploadSdWeightPage.tsx | 76 +++++++++---------- 7 files changed, 62 insertions(+), 46 deletions(-) create mode 100644 packages/fakeyou.com/src/components/common/TempInput/Input.scss create mode 100644 packages/fakeyou.com/src/components/common/TempSelect/Select.scss create mode 100644 packages/fakeyou.com/src/components/common/TempTextArea/TextArea.scss diff --git a/packages/fakeyou.com/src/components/common/TempInput/Input.scss b/packages/fakeyou.com/src/components/common/TempInput/Input.scss new file mode 100644 index 0000000000..7dc777225f --- /dev/null +++ b/packages/fakeyou.com/src/components/common/TempInput/Input.scss @@ -0,0 +1,7 @@ +input { + margin-bottom: 1rem !important; + + :last-child { + margin-bottom: 0 !important; + } +} diff --git a/packages/fakeyou.com/src/components/common/TempInput/TempInput.tsx b/packages/fakeyou.com/src/components/common/TempInput/TempInput.tsx index bf743ce1fc..a349db41b4 100644 --- a/packages/fakeyou.com/src/components/common/TempInput/TempInput.tsx +++ b/packages/fakeyou.com/src/components/common/TempInput/TempInput.tsx @@ -1,6 +1,7 @@ import React from "react"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; +import "./Input.scss"; interface InputProps extends React.InputHTMLAttributes { icon?: IconDefinition; @@ -23,7 +24,7 @@ export default function TempInput({ {label} )} -
+
{icon && ( )} diff --git a/packages/fakeyou.com/src/components/common/TempSelect/Select.scss b/packages/fakeyou.com/src/components/common/TempSelect/Select.scss new file mode 100644 index 0000000000..94f46b688f --- /dev/null +++ b/packages/fakeyou.com/src/components/common/TempSelect/Select.scss @@ -0,0 +1,7 @@ +.fy-select { + margin-bottom: 1rem !important; + + :last-child { + margin-bottom: 0 !important; + } +} diff --git a/packages/fakeyou.com/src/components/common/TempSelect/TempSelect.tsx b/packages/fakeyou.com/src/components/common/TempSelect/TempSelect.tsx index 7ac093c8e8..fd7edb0f78 100644 --- a/packages/fakeyou.com/src/components/common/TempSelect/TempSelect.tsx +++ b/packages/fakeyou.com/src/components/common/TempSelect/TempSelect.tsx @@ -3,6 +3,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { IconDefinition } from "@fortawesome/fontawesome-svg-core"; import "../Select/Select.scss"; import ReactSelect, { Props as ReactSelectProps } from "react-select"; +import "./Select.scss"; export interface Option { value: string | number | boolean; @@ -35,7 +36,7 @@ export default function Select({ options.find((option: any) => option.value === value)?.label || ""; const onChange = ({ value }: any) => inChange({ target: { value, name, type: "select" } }); - const className = `form-group${icon ? " input-icon" : ""}${ + const className = `fy-select ${icon ? " input-icon" : ""}${ small ? " select-small" : "" }`; const classNames = { diff --git a/packages/fakeyou.com/src/components/common/TempTextArea/TempTextArea.tsx b/packages/fakeyou.com/src/components/common/TempTextArea/TempTextArea.tsx index 9c86b75baf..0cdf919de2 100644 --- a/packages/fakeyou.com/src/components/common/TempTextArea/TempTextArea.tsx +++ b/packages/fakeyou.com/src/components/common/TempTextArea/TempTextArea.tsx @@ -1,4 +1,5 @@ import React from "react"; +import "./TextArea.scss"; interface TextAreaProps extends React.TextareaHTMLAttributes { @@ -20,9 +21,7 @@ export default function TempTextArea({ {label} )} -
-