Skip to content

Commit

Permalink
feat(Datepicker): add tooltipLabel prop
Browse files Browse the repository at this point in the history
  • Loading branch information
maxime-gendron committed Jan 4, 2022
1 parent a84120f commit fd6f816
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/react/src/components/datepicker/datepicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,7 @@ interface DatepickerProps {
id?: string;
/** Sets input label */
label?: string;
tooltipLabel?: string;
/**
* Sets localization
* @default en-CA
Expand Down Expand Up @@ -338,6 +339,7 @@ export const Datepicker = forwardRef(({
hasTodayButton,
id,
label,
tooltipLabel,
locale = 'en-CA',
maxDate,
minDate,
Expand Down Expand Up @@ -477,6 +479,7 @@ export const Datepicker = forwardRef(({
noMargin={noMargin}
fieldId={fieldId}
label={label}
tooltipLabel={tooltipLabel}
hint={hint}
valid={valid}
validationErrorMessage={validationErrorMessage || t('validationErrorMessage')}
Expand Down
4 changes: 4 additions & 0 deletions packages/storybook/stories/datepicker.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export const Normal: Story = () => (
<Datepicker label="Date" hint="Hint" />
);

export const WithTooltip: Story = () => (
<Datepicker label="Date" tooltipLabel="Tooltip text content" hint="Hint" />
);

export const InsideShadowDom: Story = () => (
<Datepicker label="Date" hint="Hint" />
);
Expand Down

0 comments on commit fd6f816

Please sign in to comment.