refactor: PrimaryButton to Button
This commit is contained in:
@@ -2,12 +2,12 @@ import React from 'react'
|
||||
|
||||
type Props = {} & React.ButtonHTMLAttributes<HTMLButtonElement>;
|
||||
|
||||
function PrimaryButton({ children, className, ...rest }: Props) {
|
||||
function Button({ children, className, ...rest }: Props) {
|
||||
return (
|
||||
<button className={`${className} bg-primary w-full rounded-normal p-3 text-white font-bold text-sm`} {...rest}>
|
||||
<button className={`${className} cursor-pointer bg-primary w-full rounded-normal p-3 text-white font-bold text-sm`} {...rest}>
|
||||
{children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
|
||||
export default PrimaryButton
|
||||
export default Button
|
||||
@@ -1,4 +1,4 @@
|
||||
import PrimaryButton from '@/components/button/PrimaryButton';
|
||||
import Button from '@/components/button/PrimaryButton';
|
||||
import InputField from '@/components/input/InputField';
|
||||
import { AUTH_PAGE_ELEMENT } from '@/enums';
|
||||
import React from 'react'
|
||||
@@ -27,7 +27,7 @@ function StepEnterNumber({ onSubmit, onChange, value }: Props) {
|
||||
onChange={onChange}
|
||||
type='number' />
|
||||
</div>
|
||||
<PrimaryButton type='submit'>بعدی</PrimaryButton>
|
||||
<Button type='submit'>بعدی</Button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PrimaryButton from '@/components/button/PrimaryButton';
|
||||
import Button from '@/components/button/PrimaryButton';
|
||||
import OTPInputField from '@/components/input/MultiInputField';
|
||||
import { AUTH_PAGE_ELEMENT, AUTH_PAGE_ELEMENT as AUTH_PAGE_ELEMENTS } from '@/enums';
|
||||
import React from 'react'
|
||||
@@ -51,7 +51,7 @@ function StepEnterOtp({ onSubmit, onChange, onClick, value, phoneNumber, timerRu
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<PrimaryButton type='submit'>بعدی</PrimaryButton>
|
||||
<Button type='submit'>بعدی</Button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PrimaryButton from '@/components/button/PrimaryButton';
|
||||
import Button from '@/components/button/PrimaryButton';
|
||||
import { EyeToggleIcon } from '@/components/icons/EyeToggleIcon';
|
||||
import InputField from '@/components/input/InputField';
|
||||
import { AUTH_PAGE_ELEMENT } from '@/enums';
|
||||
@@ -43,7 +43,7 @@ function StepEnterPassword({ onSubmit, onChange, onClick, value, passwordVisible
|
||||
<input id={AUTH_PAGE_ELEMENT.INPUT_REMEMBER_ME} className='h-4.5 w-4.5 checked:accent-primary' onChange={onChange} type='checkbox' checked={rememberMe} /> </div>
|
||||
</div>
|
||||
</div>
|
||||
<PrimaryButton type='submit'>ورود به منو</PrimaryButton>
|
||||
<Button type='submit'>ورود به منو</Button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import PrimaryButton from '@/components/button/PrimaryButton';
|
||||
import Button from '@/components/button/PrimaryButton';
|
||||
import { EyeToggleIcon } from '@/components/icons/EyeToggleIcon';
|
||||
import InputField from '@/components/input/InputField';
|
||||
import { AUTH_PAGE_ELEMENT } from '@/enums';
|
||||
@@ -52,7 +52,7 @@ function StepNewPassword({ reset = false, onSubmit, onChange, onClick, value, re
|
||||
</button>
|
||||
</InputField>
|
||||
</div>
|
||||
<PrimaryButton type='submit'>ورود</PrimaryButton>
|
||||
<Button type='submit'>ورود</Button>
|
||||
</form>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user