Skip to content

Commit

Permalink
slider hours fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
hema35 committed May 10, 2023
1 parent 7e495ee commit d389ef2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default function SignUpForm() {
'Invalid url'
).transform((_, value) => value === '' ? null : value),
commitment: Yup.number()
.moreThan(0, 'Commitment Field Entry is Required')
.moreThan(4, 'Commitment Field Entry is Required')
.required('Commitment Field Entry is Required'),
experience: Yup.string().required('Experience Field Entry is Required'),
accepted: Yup.boolean().required('Acceptance Field Entry is Required'),
Expand Down Expand Up @@ -171,8 +171,9 @@ export default function SignUpForm() {
</atoms.Typography>

<atoms.Slider
min={0}
max={10}
min={5}
max={40}
initialValue={5}
onChange={(value) => setFieldValue('commitment', +value)}
withLabels
suffix=" hrs"
Expand Down
2 changes: 1 addition & 1 deletion packages/UI/src/components/atoms/Slider/Slider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export default function Slider({
};

const getBubblePosition = () => {
return value > 0 ? (value / max) * 100 : 0;
return value > 0 ? ((value - min) / (max - min)) * 100 : 0;
};

return (
Expand Down

0 comments on commit d389ef2

Please sign in to comment.