Skip to content

Commit

Permalink
feat(button): setting up types on button
Browse files Browse the repository at this point in the history
  • Loading branch information
richmccartney committed Nov 30, 2020
1 parent 20b4817 commit 610938a
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/react/src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import React, {
forwardRef
forwardRef, FunctionComponent, ReactNode
} from 'react';

const Button = forwardRef(
type Ref = React.Ref<HTMLButtonElement>

interface ButtonProps {
children: ReactNode
id: string
}

const Button: FunctionComponent<ButtonProps> = forwardRef(
(
{ children, id },
ref
ref: Ref
) => {
return <button id={id} ref={ref}>{children}</button>
}
Expand Down

0 comments on commit 610938a

Please # to comment.