Skip to content

Commit

Permalink
refactor: add types for PrimaryButton
Browse files Browse the repository at this point in the history
  • Loading branch information
mattborghi committed Dec 17, 2023
1 parent 14d837f commit 7907e98
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
*/

import React from 'react';
import Button from '../Button';
import { Button, ButtonProps } from '../Button';

const PrimaryButton = (props) => <Button kind="primary" {...props} />;
const PrimaryButton = <T extends React.ElementType>(props: ButtonProps<T>) => (
<Button kind="primary" {...props} />
);

export default PrimaryButton;

0 comments on commit 7907e98

Please sign in to comment.