Shun Miyazawa hace 4 años
padre
commit
6a7db70ed5

+ 24 - 2
packages/app/src/components/WatchButton.jsx

@@ -1,15 +1,37 @@
 import React from 'react';
+import PropTypes from 'prop-types';
+
 import { withTranslation } from 'react-i18next';
 
-const WatchButton = () => {
+
+const WatchButton = (props) => {
+
+  const handleClick = () => {
+    console.log('watch button clicked!');
+  };
 
   return (
     <>
-      <p>Hello Watch Button</p>
+      <button
+        type="button"
+        id="bookmark-button"
+        onClick={handleClick}
+        className={`btn btn-bookmark border-0 ${`btn-${props.size}`}`}
+      >
+        <i className="fa fa-eye"></i>
+      </button>
+
     </>
   );
 
 };
 
+WatchButton.propTypes = {
+  size: PropTypes.string,
+};
+
+WatchButton.defaultProps = {
+  size: 'md',
+};
 
 export default withTranslation()(WatchButton);

+ 1 - 0
packages/app/src/styles/_subnav.scss

@@ -38,6 +38,7 @@
     }
   }
 
+  .btn-watch,
   .btn-like,
   .btn-bookmark {
     height: 40px;