Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: Label is mandatory for TimePicker component #2629

Merged
merged 13 commits into from
Oct 27, 2023
Merged
7 changes: 4 additions & 3 deletions src/components/forms/TimePicker/TimePicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const completeTimePicker = (
<TimePicker
id="appointment-time"
name="appointment-time"
label="Appointment Time"
label="Appointment time"
hint="hh:mm"
onChange={noop}
disabled={argTypes.disabled}
Expand All @@ -54,6 +54,7 @@ export const defaultTimePicker = (
<TimePicker
id="appointment-time"
name="appointment-time"
label="Appointment time"
onChange={noop}
disabled={argTypes.disabled}
/>
Expand All @@ -67,7 +68,7 @@ export const withMinAndMaxTimes = (
<TimePicker
id="appointment-time"
name="appointment-time"
label="Appointment Time"
label="Appointment time"
hint="hh:mm (9:00am - 5:00pm)"
minTime="9:00"
maxTime="17:00"
Expand All @@ -84,7 +85,7 @@ export const withDefaultValue = (
<TimePicker
id="appointment-time"
name="appointment-time"
label="Appointment Time"
label="Appointment time"
hint="hh:mm"
defaultValue="12:00"
onChange={noop}
Expand Down
1 change: 1 addition & 0 deletions src/components/forms/TimePicker/TimePicker.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ describe('TimePicker Component', () => {
const testProps = {
id: 'appointment-time',
name: 'appointment-time',
label: 'Appointment time',
onChange: jest.fn(),
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/TimePicker/TimePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type BaseTimePickerProps = {
id: string
name: string
onChange: (val?: string) => void
label?: string
label: string
defaultValue?: string
disabled?: boolean
minTime?: string
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -16237,4 +16237,4 @@ zip-stream@^4.1.0:
zwitch@^1.0.0:
version "1.0.5"
resolved "https://registry.yarnpkg.com/zwitch/-/zwitch-1.0.5.tgz#d11d7381ffed16b742f6af7b3f223d5cd9fe9920"
integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==
integrity sha512-V50KMwwzqJV0NpZIZFwfOD5/lyny3WlSzRiXgA0G7VUnRlqttta1L6UQIHzd6EuBY/cHGfwTIck7w1yH6Q5zUw==
Loading