diff --git a/src/devToolUI.tsx b/src/devToolUI.tsx index 5fd95cd..7a58f58 100644 --- a/src/devToolUI.tsx +++ b/src/devToolUI.tsx @@ -90,6 +90,7 @@ export const DevToolUI: React.FC = ({ background: 'none', ...styles?.button, }} + type="button" > diff --git a/src/formStateTable.tsx b/src/formStateTable.tsx index b747340..5166827 100644 --- a/src/formStateTable.tsx +++ b/src/formStateTable.tsx @@ -130,6 +130,7 @@ const FormStateTable = ({ onClick={() => { setShowFormState(!showFormState); }} + type="button" > { }} title="Update values and state the form" onClick={() => setData({})} + type="button" > ♺ REFRESH @@ -162,6 +163,7 @@ const Panel = ({ control, control: { _fields } }: { control: Control }) => { onClick={() => { actions.setCollapse(!state.isCollapse); }} + type="button" > {state.isCollapse ? '[-] COLLAPSE' : '[+] EXPAND'} diff --git a/src/panelTable.tsx b/src/panelTable.tsx index 230644c..0cb9f9a 100644 --- a/src/panelTable.tsx +++ b/src/panelTable.tsx @@ -91,6 +91,7 @@ const PanelTable = ({ textAlign: 'center', marginRight: 8, }} + type="button" > {collapse ? '+' : '-'} @@ -114,6 +115,7 @@ const PanelTable = ({ ? {} : { cursor: 'not-allowed', background: colors.lightBlue }), }} + type="button" > {isNative ? 'Native' : 'Custom'} diff --git a/src/styled.tsx b/src/styled.tsx index c48b400..0caf7ab 100644 --- a/src/styled.tsx +++ b/src/styled.tsx @@ -1,4 +1,3 @@ -import React from 'react'; import styled from '@emotion/styled'; import colors from './colors'; @@ -8,16 +7,7 @@ export const paraGraphDefaultStyle = { lineHeight: '20px', }; -interface ButtonBaseProps - extends React.ButtonHTMLAttributes { - type?: React.ButtonHTMLAttributes['type']; -} - -const ButtonBase = ({ type = 'button', ...props }: ButtonBaseProps) => { - return ; -}; - -const Button = styled(ButtonBase)<{ hideBackground?: boolean }>` +const Button = styled.button<{ hideBackground?: boolean }>` appearance: none; margin: 0; border: 0;