diff --git a/packages/button/index.tsx b/packages/button/index.tsx index 444aa3464..65091488c 100644 --- a/packages/button/index.tsx +++ b/packages/button/index.tsx @@ -28,16 +28,17 @@ const BUTTON_CLASS_NAME = 'mdc-button__icon'; type ButtonTypes = HTMLAnchorElement | HTMLButtonElement; -export interface ButtonProps extends Ripple.InjectedProps, React.HTMLAttributes { - raised?: boolean; - unelevated?: boolean; - outlined?: boolean; - dense?: boolean; - disabled?: boolean; - className?: string; - icon?: React.ReactElement>; - href?: string; - trailingIcon?: React.ReactElement>; +export interface ButtonProps + extends Ripple.InjectedProps, React.AnchorHTMLAttributes, React.ButtonHTMLAttributes { + raised?: boolean; + unelevated?: boolean; + outlined?: boolean; + dense?: boolean; + disabled?: boolean; + className?: string; + icon?: React.ReactElement>; + href?: string; + trailingIcon?: React.ReactElement>; } export const Button = ( diff --git a/test/unit/button/index.test.tsx b/test/unit/button/index.test.tsx index 3d3ecc754..3471bb8e7 100644 --- a/test/unit/button/index.test.tsx +++ b/test/unit/button/index.test.tsx @@ -66,6 +66,16 @@ test('renders a button with an anchor tag', () => { assert.equal(wrapper.type(), 'a'); }); +test('renders a button with a button attribute', () => { + const wrapper = shallow(