Browse Source

Used button for tabs instead of span

Snow 8 years ago
parent
commit
52e5c4bbda
2 changed files with 5 additions and 2 deletions
  1. 2 2
      src/components/Tabs/index.js
  2. 3 0
      src/components/Tabs/style.css

+ 2 - 2
src/components/Tabs/index.js

@@ -9,13 +9,13 @@ const TabGroup = props => {
   return (
     <div className="tabGroup">
       {props.tabs.map((tabName, id) =>
-        <span
+        <button
           onClick={() => props.handleClick(id)}
           className={'tab ' + props.isActive(id)}
           key={tabName}
         >
           {tabName}
-        </span>
+        </button>
       )}
     </div>
   );

+ 3 - 0
src/components/Tabs/style.css

@@ -1,5 +1,6 @@
 
 .tab {
+	border: 0;
 	border-top: 1px solid black;
 	border-left: 1px solid black;
 	border-right: 1px solid black;
@@ -9,6 +10,8 @@
 	margin-right: 5px;
 	color: white;
 	display: inline-block;
+	outline:none;
+	width: 80px;
 }
 
 .tab.active {