Skip to content

Commit

Permalink
Convert ViewportAwareButton JS files to TypeScript (#1094)
Browse files Browse the repository at this point in the history
* convert to typescript

* rename vanilla js files

* re-style ViewportAwareButtonProps, revert test

---------

Co-authored-by: Michael Lan <[email protected]>
  • Loading branch information
LeroyBG and mizlan authored Oct 31, 2023
1 parent 792ece0 commit 7e79e88
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,15 @@ import { Button } from 'reactstrap';
/** --------Optional props--------
* any props you would apply to a reactstrap Button.
*/
const ViewportAwareButton = function (props) {

interface ViewportAwareButtonProps{
icon: React.JSX.Element,
text: string,
isSmall: boolean,
remainder: any,
};

const ViewportAwareButton = function (props : ViewportAwareButtonProps) {
// extract icon and text from props.
const {
icon, text, isSmall, ...remainder
Expand Down

0 comments on commit 7e79e88

Please sign in to comment.