Skip to content
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
1 change: 1 addition & 0 deletions src/devToolUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export const DevToolUI: React.FC<DevtoolUIProps> = ({
background: 'none',
...styles?.button,
}}
type="button"
>
<Logo actions={actions} />
</Button>
Expand Down
1 change: 1 addition & 0 deletions src/formStateTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ const FormStateTable = ({
onClick={() => {
setShowFormState(!showFormState);
}}
type="button"
>
<span
style={{
Expand Down
2 changes: 2 additions & 0 deletions src/panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ const Panel = ({ control, control: { _fields } }: { control: Control }) => {
}}
title="Update values and state the form"
onClick={() => setData({})}
type="button"
>
♺ REFRESH
</Button>
Expand All @@ -162,6 +163,7 @@ const Panel = ({ control, control: { _fields } }: { control: Control }) => {
onClick={() => {
actions.setCollapse(!state.isCollapse);
}}
type="button"
>
{state.isCollapse ? '[-] COLLAPSE' : '[+] EXPAND'}
</Button>
Expand Down
2 changes: 2 additions & 0 deletions src/panelTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ const PanelTable = ({
textAlign: 'center',
marginRight: 8,
}}
type="button"
>
{collapse ? '+' : '-'}
</Button>
Expand All @@ -114,6 +115,7 @@ const PanelTable = ({
? {}
: { cursor: 'not-allowed', background: colors.lightBlue }),
}}
type="button"
>
{isNative ? 'Native' : 'Custom'}
</Button>
Expand Down
12 changes: 1 addition & 11 deletions src/styled.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import React from 'react';
import styled from '@emotion/styled';

import colors from './colors';
Expand All @@ -8,16 +7,7 @@ export const paraGraphDefaultStyle = {
lineHeight: '20px',
};

interface ButtonBaseProps
extends React.ButtonHTMLAttributes<HTMLButtonElement> {
type?: React.ButtonHTMLAttributes<HTMLButtonElement>['type'];
}

const ButtonBase = ({ type = 'button', ...props }: ButtonBaseProps) => {
return <ButtonBase type={type} {...props} />;
};

const Button = styled(ButtonBase)<{ hideBackground?: boolean }>`
const Button = styled.button<{ hideBackground?: boolean }>`
appearance: none;
margin: 0;
border: 0;
Expand Down
Loading