diff --git a/src/common/DefaultInput.tsx b/src/common/DefaultInput.tsx new file mode 100644 index 000000000..82b9d76be --- /dev/null +++ b/src/common/DefaultInput.tsx @@ -0,0 +1,41 @@ +import React from "react"; + +interface DefaultInputProps { + customStyle?: React.CSSProperties; + width?: number | string; + textAlign?: "left" | "center" | "right"; + type?: string; + value?: string | number; + onChange?: (e: React.ChangeEvent) => void; + placeholder?: string; +} + +const DefaultInput: React.FC = ({ + customStyle, + width, + textAlign = "left", + type, + value, + onChange, + placeholder, +}) => { + const baseStyle: React.CSSProperties = { + textAlign, + width: width || "100%", + boxShadow: "var(--shadow)", + ...customStyle, + }; + + return ( + + ); +}; + +export default DefaultInput; diff --git a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.scss b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.scss index ed1f3d62c..99ecce4f6 100644 --- a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.scss +++ b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.scss @@ -36,11 +36,7 @@ padding: 8px 18px; cursor: pointer; } - .default-input { - width: 100%; - padding: 8px 8px !important; - border-radius: 4px !important; - } + .default-input::-webkit-inner-spin-button, .default-input::-webkit-outer-spin-button { -webkit-appearance: none; diff --git a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx index 30ac1722b..8d06887fd 100644 --- a/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx +++ b/src/components/GoalsComponents/GoalConfigModal/ConfigGoal.tsx @@ -21,6 +21,7 @@ import { ILocationState } from "@src/Interfaces"; import { useLocation, useNavigate } from "react-router-dom"; import { suggestedGoalState } from "@src/store/SuggestedGoalState"; import { getHistoryUptoGoal } from "@src/helpers/GoalProcessor"; +import DefaultInput from "@src/common/DefaultInput"; import { colorPalleteList, calDays, convertOnFilterToArray, getSelectedLanguage } from "../../../utils"; import "./ConfigGoal.scss"; @@ -429,14 +430,15 @@ const ConfigGoal = ({ type, goal, mode }: { type: TGoalCategory; mode: TGoalConf
{t("duration")} - { setTags({ ...tags, duration: roundOffHours(e.target.value) }); }} + customStyle={{ borderRadius: "4px", padding: "8px 8px" }} /> {t("dueDate")} { const { t } = useTranslation(); @@ -76,9 +77,7 @@ export const Focus = () => { /> {editMode ? (
- setUserEnteredTime(e.target.value)} diff --git a/src/global.scss b/src/global.scss index 3d62b2048..fc7d92d25 100644 --- a/src/global.scss +++ b/src/global.scss @@ -140,7 +140,6 @@ h6 { border-radius: 8px; outline: none; border: none; - color: black; background: var(--secondary-background); } diff --git a/src/pages/InvitePage/InvitePage.tsx b/src/pages/InvitePage/InvitePage.tsx index 791a00691..92fef14d3 100644 --- a/src/pages/InvitePage/InvitePage.tsx +++ b/src/pages/InvitePage/InvitePage.tsx @@ -8,6 +8,7 @@ import { acceptRelationship } from "@src/services/contact.service"; import OnboardingLayout from "@src/layouts/OnboardingLayout"; import { displayPartnerModeTour } from "@src/store/TourState"; import { LocalStorageKeys } from "@src/constants/localStorageKeys"; +import DefaultInput from "@src/common/DefaultInput"; const InvitePage = () => { const navigate = useNavigate(); @@ -60,11 +61,10 @@ const InvitePage = () => {
Add them to your contact list.

- setNewContactName(e.target.value)} - className="default-input" + setNewContactName(e.target.value)} /> {/* Make this button a component */}