Skip to content

Commit

Permalink
fix: makes all button type button by default
Browse files Browse the repository at this point in the history
  • Loading branch information
AssisrMatheus committed Apr 12, 2023
1 parent 8949cb9 commit 6da1a03
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/components/Drawer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,12 @@ export const Drawer: React.FC<PropsWithChildren<DrawerProps>> = ({
<div className={classnames('flex items-center', { 'justify-between': onBack, 'justify-end': !onBack })}>
{/* If there's the back button, display it */}
{onBack && (
<button className="pui-btn-icon text-pui-paragraph-900 p-4" onClick={onBack}>
<button type="button" className="pui-btn-icon text-pui-paragraph-900 p-4" onClick={onBack}>
{/* Adds a back icon */}
<BackIcon className="pui-animate-scaleHover-target" />
</button>
)}
<button className="pui-btn-icon text-pui-paragraph-900 p-4" onClick={() => onOpen(false)}>
<button type="button" className="pui-btn-icon text-pui-paragraph-900 p-4" onClick={() => onOpen(false)}>
{/* Adds a close icon */}
<CrossIcon className="pui-animate-scaleHover-target" />
</button>
Expand Down
1 change: 1 addition & 0 deletions src/components/EventCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ export const EventCard: React.FC<EventCardProps> = ({
/>
</div>
<button
type="button"
onClick={onPressButton}
className="inline-flex items-center pui-chip-bordered h-8 justify-items-end cursor-pointer font-bold focus:outline-none"
>
Expand Down
2 changes: 2 additions & 0 deletions src/components/HorizontalResizeablePanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,13 +147,15 @@ export const HorizontalResizeablePanel: React.FC<HorizontalResizeablePanelProps>
<div {...props} className={classNames('relative', props.className)} ref={ref}>
{resizeLeft && (
<button
type="button"
className="absolute h-full inset-y-0 w-2 cursor-col-resize"
style={{ left: '-4px' }}
onMouseDown={(e) => onMove(e, 'left')}
/>
)}
{resizeRight && (
<button
type="button"
className="absolute h-full inset-y-0 w-2 cursor-col-resize"
style={{ right: '-4px' }}
onMouseDown={(e) => onMove(e, 'right')}
Expand Down
2 changes: 1 addition & 1 deletion src/components/Modal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ export const Modal: React.FC<PropsWithChildren<ModalProps>> = ({
<h3 className={classnames(removePadding ? 'p-0' : 'p-4')}>{title}</h3>
{/* Adds a close icon */}
{isClosable && (
<button className="pui-btn-icon text-pui-paragraph-900 px-6 py-4" onClick={onToggle}>
<button type="button" className="pui-btn-icon text-pui-paragraph-900 px-6 py-4" onClick={onToggle}>
<CrossIcon className="pui-animate-scaleHover-target" />
</button>
)}
Expand Down
1 change: 1 addition & 0 deletions src/components/ModuleCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ export const ModuleCard: React.FC<ModuleCardProps> = ({
<div className={classnames('text-base mb-6 font-normal', classNameContent)}>{content}</div>
<div className="flex-1 inline-flex justify-end items-end w-full">
<button
type="button"
onClick={onPressButton}
className="inline-flex items-center pui-chip-bordered h-8 justify-items-end cursor-pointer font-bold focus:outline-none"
>
Expand Down
1 change: 1 addition & 0 deletions src/components/ProgramCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ export const ProgramCard: React.FC<ProgramCardProps> = ({
</div>
<div className="inline-flex justify-end items-center w-full">
<button
type="button"
onClick={onPressButton}
className="inline-flex items-center pui-chip-bordered h-8 justify-items-end cursor-pointer font-bold focus:outline-none"
>
Expand Down
1 change: 1 addition & 0 deletions src/components/WYSIWYGInput/Toolbar/Section/Item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const SectionItems: React.FC<SectionItemsProps> = ({
const isActive = item.isActive(editorState);
return (
<button
type="button"
key={item.name}
className={classnames(
'pui-btn-icon p-0 h-8 w-8 flex items-center justify-center border border-gray-200',
Expand Down

0 comments on commit 6da1a03

Please sign in to comment.