diff --git a/package.json b/package.json
index dfb215659..e8b0ca2b8 100644
--- a/package.json
+++ b/package.json
@@ -6,7 +6,7 @@
"start": "webpack-dev-server --config test/screenshot/webpack.config.js --content-base test/screenshot",
"stop": "./test/screenshot/stop.sh",
"build": "npm run clean && mkdirp build && node --max_old_space_size=8192 node_modules/.bin/webpack --config packages/webpack.config.js --progress --colors",
- "capture": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 20000 test/screenshot/capture-suite.tsx",
+ "capture": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 30000 test/screenshot/capture-suite.tsx",
"clean": "rm -rf build/** build packages/**/dist/",
"commitmsg": "validate-commit-msg",
"fix": "eslint --fix --ext .jsx,.js,.tsx,.ts packages test",
@@ -18,7 +18,7 @@
"test:watch": "karma start karma.local.js --auto-watch",
"test:unit": "npm run clean && NODE_ENV=test karma start karma.local.js --single-run",
"test:unit-ci": "karma start karma.ci.js --single-run",
- "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 20000 test/screenshot/diff-suite.tsx",
+ "test:image-diff": "MDC_COMMIT_HASH=$(git rev-parse --short HEAD) MDC_BRANCH_NAME=$(git rev-parse --abbrev-ref HEAD) mocha --require ts-node/register --require babel-core/register --ui tdd --timeout 30000 test/screenshot/diff-suite.tsx",
"test:screenshots": "docker run -it --rm --cap-add=SYS_ADMIN -e MDC_GCLOUD_SERVICE_ACCOUNT_KEY=\"${MDC_GCLOUD_SERVICE_ACCOUNT_KEY}\" mdcreact/screenshots /bin/sh -c 'git checkout .; git checkout master; git pull; npm i; /home/pptruser/material-components-web-react/test/screenshot/start.sh; sleep 35s; npm run test:image-diff'",
"upload:screenshots": "node ./test/screenshot/upload-screenshots.js"
},
diff --git a/packages/button/index.js b/packages/button/index.js
deleted file mode 100644
index ce008cfdb..000000000
--- a/packages/button/index.js
+++ /dev/null
@@ -1,99 +0,0 @@
-// The MIT License
-//
-// Copyright (c) 2018 Google, Inc.
-//
-// Permission is hereby granted, free of charge, to any person obtaining a copy
-// of this software and associated documentation files (the "Software"), to deal
-// in the Software without restriction, including without limitation the rights
-// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-// copies of the Software, and to permit persons to whom the Software is
-// furnished to do so, subject to the following conditions:
-//
-// The above copyright notice and this permission notice shall be included in
-// all copies or substantial portions of the Software.
-//
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-// THE SOFTWARE.
-
-import React from 'react';
-import classnames from 'classnames';
-import PropTypes from 'prop-types';
-import {withRipple} from '@material/react-ripple';
-
-export const Button = (props) => {
- const {
- className,
- raised,
- unelevated,
- outlined,
- dense,
- icon,
- children,
- initRipple,
- unbounded, // eslint-disable-line no-unused-vars
- ...otherProps
- } = props;
-
- const classes = classnames('mdc-button', className, {
- 'mdc-button--raised': raised,
- 'mdc-button--unelevated': unelevated,
- 'mdc-button--outlined': outlined,
- 'mdc-button--dense': dense,
- });
-
- const SemanticButton = props.href ? 'a' : 'button';
-
- return (
-
- {icon ? renderIcon(icon) : null}
- {children}
-
- );
-};
-
-const addClassesToElement = (classes, element) => {
- const propsWithClasses = {
- className: classnames(classes, element.props.className),
- };
- return React.cloneElement(element, propsWithClasses);
-};
-
-const renderIcon = (icon) => addClassesToElement('mdc-button__icon', icon);
-
-Button.propTypes = {
- raised: PropTypes.bool,
- unelevated: PropTypes.bool,
- outlined: PropTypes.bool,
- dense: PropTypes.bool,
- disabled: PropTypes.bool,
- unbounded: PropTypes.bool,
- initRipple: PropTypes.func,
- className: PropTypes.string,
- icon: PropTypes.element,
- href: PropTypes.string,
- children: PropTypes.string,
-};
-
-Button.defaultProps = {
- raised: false,
- unelevated: false,
- outlined: false,
- dense: false,
- disabled: false,
- unbounded: false,
- initRipple: () => {},
- className: '',
- icon: null,
- children: '',
-};
-
-export default withRipple(Button);
diff --git a/packages/button/index.tsx b/packages/button/index.tsx
new file mode 100644
index 000000000..1846ff8a8
--- /dev/null
+++ b/packages/button/index.tsx
@@ -0,0 +1,103 @@
+// The MIT License
+//
+// Copyright (c) 2018 Google, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+
+import * as React from 'react';
+import * as classnames from 'classnames';
+import * as Ripple from '@material/react-ripple';
+
+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;
+}
+
+export const Button = (
+ {
+ className = '',
+ raised = false,
+ unelevated = false,
+ outlined = false,
+ dense = false,
+ disabled = false,
+ icon,
+ href,
+ children,
+ initRipple,
+ // eslint disabled since we do not want to include
+ // this in ...otherProps.
+ // if unbounded is passed to the