1
0
mirror of https://github.com/excalidraw/excalidraw.git synced 2024-11-02 03:25:53 +01:00

feat: add missing type="button" (#8030)

This commit is contained in:
Karthik Nishanth 2024-05-18 01:36:08 -07:00 committed by GitHub
parent 7d8b7fc14d
commit ff0b4394b1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
10 changed files with 20 additions and 2 deletions

@ -468,6 +468,7 @@ export const ExitZenModeAction = ({
showExitZenModeBtn: boolean;
}) => (
<button
type="button"
className={clsx("disable-zen-mode", {
"disable-zen-mode--visible": showExitZenModeBtn,
})}

@ -28,6 +28,7 @@ export const ButtonIconSelect = <T extends Object>(
{props.options.map((option) =>
props.type === "button" ? (
<button
type="button"
key={option.text}
onClick={(event) => props.onClick(option.value, event)}
className={clsx({

@ -22,7 +22,12 @@ export const CheckboxItem: React.FC<{
).focus();
}}
>
<button className="Checkbox-box" role="checkbox" aria-checked={checked}>
<button
type="button"
className="Checkbox-box"
role="checkbox"
aria-checked={checked}
>
{checkIcon}
</button>
<div className="Checkbox-label">{children}</div>

@ -105,6 +105,7 @@ export const ContextMenu = React.memo(
}}
>
<button
type="button"
className={clsx("context-menu-item", {
dangerous: actionName === "deleteSelectedElements",
checkmark: item.checked?.(appState),

@ -123,6 +123,7 @@ export const Dialog = (props: DialogProps) => {
onClick={onClose}
title={t("buttons.close")}
aria-label={t("buttons.close")}
type="button"
>
{CloseIcon}
</button>

@ -27,7 +27,11 @@ const FollowMode = ({
{userToFollow.username}
</span>
</div>
<button onClick={onDisconnect} className="follow-mode__disconnect-btn">
<button
type="button"
onClick={onDisconnect}
className="follow-mode__disconnect-btn"
>
{CloseIcon}
</button>
</div>

@ -108,6 +108,7 @@ function Picker<T>({
<div className="picker-content" ref={rGallery}>
{options.map((option, i) => (
<button
type="button"
className={clsx("picker-option", {
active: value === option.value,
})}
@ -171,6 +172,7 @@ export function IconPicker<T>({
<div>
<button
name={group}
type="button"
className={isActive ? "active" : ""}
aria-label={label}
onClick={() => setActive(!isActive)}

@ -555,6 +555,7 @@ const LayerUI = ({
)}
{appState.scrolledOutside && (
<button
type="button"
className="scroll-back-to-content"
onClick={() => {
setAppState((appState) => ({

@ -194,6 +194,7 @@ export const MobileMenu = ({
!appState.openMenu &&
!appState.openSidebar && (
<button
type="button"
className="scroll-back-to-content"
onClick={() => {
setAppState((appState) => ({

@ -65,6 +65,7 @@ const ChartPreviewBtn = (props: {
return (
<button
type="button"
className="ChartPreview"
onClick={() => {
if (chartElements) {