Fix tests

This commit is contained in:
Chi Vinh Le
2018-09-06 00:06:58 +02:00
parent 31bc5fa913
commit c96112fc8c
39 changed files with 1095 additions and 262 deletions
@@ -1,6 +1,6 @@
import cn from "classnames";
import { pick } from "lodash";
import React, { ButtonHTMLAttributes, Ref } from "react";
import React, { Ref } from "react";
import { withForwardRef, withStyles } from "talk-ui/hocs";
import { PropTypesOf } from "talk-ui/types";
@@ -10,7 +10,7 @@ import * as styles from "./Button.css";
// This should extend from BaseButton instead but we can't because of this bug
// TODO: add bug link.
interface InnerProps extends ButtonHTMLAttributes<HTMLButtonElement> {
interface InnerProps extends BaseButtonProps {
/** If set renders an anchor tag instead */
anchor?: boolean;
href?: string;
@@ -31,7 +31,7 @@ export const ButtonIcon: StatelessComponent<InnerProps> = props => {
ButtonIcon.defaultProps = {
size: "sm",
};
} as Partial<InnerProps>;
const enhanced = withForwardRef(withStyles(styles)(ButtonIcon));
export type ButtonIconProps = PropTypesOf<typeof enhanced>;