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

Added missing type prop to inner buttons #1107

Merged
merged 1 commit into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const preview: Preview = {
},
},

tags: ["autodocs"]
tags: ["autodocs"],
};

export default preview;
1 change: 1 addition & 0 deletions src/components/Breadcrumbs/BreadcrumbButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const BreadcrumbButton: FC<
return (
<Fragment>
<button
type={"button"}
css={[breadcrumbButtonTheme]}
onClick={onClick}
disabled={disabled || false}
Expand Down
2 changes: 2 additions & 0 deletions src/components/DateTimeInput/DateTimeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ const DateTimeSelector: FC<DateTimeSelectorProps> = ({
css={[optionChangeButton]}
className={currentView === "calendar" ? "selected" : ""}
onClick={() => setCurrentView("calendar")}
type={"button"}
>
<CalendarIcon />
<span>{value?.toFormat("dd LLL yyyy") || ""}</span>
Expand All @@ -160,6 +161,7 @@ const DateTimeSelector: FC<DateTimeSelectorProps> = ({
css={[optionChangeButton]}
className={currentView === "time" ? "selected" : ""}
onClick={() => setCurrentView("time")}
type={"button"}
>
<Clock4Icon />
<span>
Expand Down
1 change: 1 addition & 0 deletions src/components/DateTimeInput/TimeSelector.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@ const TimeSelector: FC<TimeSelectorProps> = ({
type: "hour" | "minute" | "second" | "meridiem";
}) => (
<button
type={"button"}
css={selectorButton}
onClick={() => {
changeTimeAction(itemValue, type);
Expand Down
1 change: 1 addition & 0 deletions src/components/ExpandMenu/ExpandMenuOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ const ExpandMenuOption: FC<
return (
<button
id={id}
type={"button"}
className={`option-element ${variant}`}
css={[expandMenuOptionStyles(theme), extraPadding, overrideThemes]}
{...restProps}
Expand Down
1 change: 1 addition & 0 deletions src/components/LinkButton/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const LinkButton: FC<LinkButtonProps> = ({

return (
<button
type={"button"}
className="LinkButton"
css={[buttonVariant, overrideThemes]}
{...props}
Expand Down
7 changes: 6 additions & 1 deletion src/components/ModalBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,12 @@ const ModalBox: FC<ModalBoxProps> = ({
{titleIcon}
{title}
</div>
<button className={"closeModalButton"} id={"close"} onClick={onClose}>
<button
type={"button"}
className={"closeModalButton"}
id={"close"}
onClick={onClose}
>
<XIcon />
</button>
</div>
Expand Down
2 changes: 1 addition & 1 deletion src/components/NotificationAlert/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ const Index: FC<NotificationAlertPrp & HTMLAttributes<HTMLDivElement>> = ({
</div>
</div>
{onClose && (
<button className={"dismissAlert"} onClick={onClose}>
<button type={"button"} className={"dismissAlert"} onClick={onClose}>
<XIcon />
</button>
)}
Expand Down
1 change: 1 addition & 0 deletions src/components/Tabs/TabButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ const TabButton: FC<TabButtonProps> = ({
onClick={() => onClick()}
disabled={disabled}
className={`${selected ? "selected" : ""}`}
type={"button"}
>
{icon}
{label}
Expand Down
6 changes: 5 additions & 1 deletion src/components/Tag/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,11 @@ const Tag: FC<TagProps & React.HTMLAttributes<HTMLSpanElement>> = ({
{children}
</span>
{onDelete && (
<button className={"deleteTagButton"} onClick={() => onDelete(id)}>
<button
type={"button"}
className={"deleteTagButton"}
onClick={() => onDelete(id)}
>
<XIcon />
</button>
)}
Expand Down
1 change: 1 addition & 0 deletions src/components/Wizard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ const GenericWizard = ({
{wizardSteps.map((step, index) => {
return (
<button
type={"button"}
key={`wizard-step-${index}`}
id={"wizard-step-" + step.label.toLowerCase().replace(" ", "-")}
onClick={() => pageChange(index)}
Expand Down
Loading