-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: continue migrate to next13 and redesign -
layout for decstop is finished
- Loading branch information
Showing
16 changed files
with
366 additions
and
48 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,3 +1,3 @@ | ||
{ | ||
"extends": ["next/babel","next/core-web-vitals"] | ||
} | ||
"extends": "next/core-web-vitals" | ||
} |
23 changes: 23 additions & 0 deletions
23
hospital-next/src/app/components/CheckBox/CheckBox.module.css
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,23 @@ | ||
|
||
.input{ | ||
width: 1.6em; | ||
height: 1.6em; | ||
border-radius: 0.15em; | ||
margin-right: 0.5em; | ||
border: 0.15em solid #007a7e; | ||
background-color: rgba(17, 224, 121, 0.211);; | ||
outline: none; | ||
cursor: pointer; | ||
} | ||
.inputError{ | ||
outline-color: red; | ||
} | ||
.inputDisabled{ | ||
cursor: default; | ||
opacity: 50; | ||
} | ||
.textCheckBox { | ||
font-size: 15px; | ||
color: #686868; | ||
line-height: 1.5; | ||
} |
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,36 @@ | ||
'use client'; | ||
import React from 'react'; | ||
import styles from './CheckBox.module.css'; | ||
import clsx from 'clsx'; | ||
|
||
import { FieldErrors, FieldValues, UseFormRegister } from 'react-hook-form'; | ||
|
||
interface CheckBoxProps { | ||
label?: string; | ||
id: string; | ||
required?: boolean; | ||
register?: UseFormRegister<FieldValues>; | ||
errors?: FieldErrors; | ||
disabled?: boolean; | ||
} | ||
|
||
const CheckBox: React.FC<CheckBoxProps> = ({ label, id, required, register, errors, disabled }) => { | ||
return ( | ||
<label htmlFor={id}> | ||
<input | ||
id={id} | ||
type="checkbox" | ||
autoComplete={id} | ||
disabled={disabled} | ||
className={clsx(` | ||
${styles.input} | ||
${disabled && styles.inputDisabled} | ||
`)} | ||
/> | ||
<span className={styles.textCheckBox}>{label}</span> | ||
</label> | ||
); | ||
}; | ||
|
||
export default CheckBox; |
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
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,5 +1,4 @@ | ||
.inputWrapper{ | ||
margin-top: 2px; | ||
width: 100%; | ||
} | ||
.input{ | ||
|
1 change: 0 additions & 1 deletion
1
hospital-next/src/app/components/Subscription/Subscription.module.css
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
18 changes: 16 additions & 2 deletions
18
hospital-next/src/app/components/Subscription/Subscription.tsx
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,17 +1,31 @@ | ||
'use client'; | ||
import React, { useState } from 'react'; | ||
import { FieldValues, useForm, SubmitHandler } from 'react-hook-form'; | ||
import styles from './Subscription.module.css'; | ||
import Button from '../Button/Button'; | ||
import Input from '../Input/Input'; | ||
|
||
const Subscription: React.FC = () => { | ||
const [submit, setSubmit] = useState(false); | ||
const { | ||
register, | ||
handleSubmit, | ||
formState: { errors }, | ||
} = useForm<FieldValues>({ | ||
defaultValues: { | ||
email: '', | ||
}, | ||
}); | ||
const onSubmit: SubmitHandler<FieldValues> = (data) => {}; | ||
return ( | ||
<div className={styles.subscriptionContainer}> | ||
<div className={styles.container}> | ||
<div className={styles.content}> | ||
<form className={`${styles.subscription} ${submit ? styles.done : styles.test}`}> | ||
<Input type="email" placeholder="[email protected]" /> | ||
<form | ||
className={`${styles.subscription} ${submit ? styles.done : styles.test}`} | ||
onSubmit={handleSubmit(onSubmit)} | ||
> | ||
<Input register={register} id={'Email'} errors={errors} type="email" /> | ||
<button | ||
className={styles.submitEmail} | ||
type="button" | ||
|
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
This file was deleted.
Oops, something went wrong.
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,36 @@ | ||
.container{ | ||
padding: 20px 55px; | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
} | ||
.content{ | ||
width: 50%; | ||
} | ||
.container h2{ | ||
color: #3b3b3b; | ||
font-size: 32px; | ||
text-align: center; | ||
margin-bottom: 50px; | ||
} | ||
.container h3{ | ||
font-size: 22px; | ||
font-weight: 500; | ||
color: #3b3b3b; | ||
margin-bottom: 20px; | ||
margin-top: 30px; | ||
line-height: 1.3; | ||
} | ||
.container p{ | ||
font-size: 1em; | ||
line-height: 1.6; | ||
margin-bottom: 15px; | ||
color: #686868; | ||
} | ||
.container h4{ | ||
font-size: 17px; | ||
font-weight: 500; | ||
color: #4d4d51; | ||
line-height: 1.5; | ||
margin-top: 20px; | ||
} |
Oops, something went wrong.