Skip to content

Commit

Permalink
Fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
shoonia committed Jan 1, 2024
1 parent a133b9e commit efd0b76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
7 changes: 2 additions & 5 deletions src/components/Button/BlankButton.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import type { JSX, ComponentChildren } from 'preact';
import type { JSX } from 'preact';

import s from './styles.css';
import { classNames } from '../../util/component';

interface Props {
onClick?: JSX.MouseEventHandler<HTMLButtonElement>;
children?: ComponentChildren;
interface Props extends JSX.HTMLAttributes<HTMLButtonElement> {
className?: string;
[key: string]: unknown;
}

export const BlankButton: FC<Props> = ({ children, className, ...rest }) => {
Expand Down
9 changes: 2 additions & 7 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
import type { ComponentChildren } from 'preact';
import type { JSX } from 'preact';

import s from './styles.css';
import { classNames } from '../../util/component';

interface Props {
type?: string;
onClick?: EventListener;
disabled?: boolean;
children?: ComponentChildren;
interface Props extends JSX.HTMLAttributes<HTMLButtonElement> {
className?: string;
[key: string]: unknown;
}

export const Button: FC<Props> = ({
Expand Down

0 comments on commit efd0b76

Please sign in to comment.