Browse Source

Prettied the code. Added prettier .jsx support.

Snow 8 years ago
parent
commit
0115b97ac5
4 changed files with 22 additions and 19 deletions
  1. 5 1
      package.json
  2. 1 1
      src/components/Tabs/ContentView.js
  3. 1 1
      src/components/Tabs/TabView.jsx
  4. 15 16
      src/components/Tabs/index.js

+ 5 - 1
package.json

@@ -33,6 +33,10 @@
     "*.js": [
       "prettier --single-quote --es5 --write",
       "git add"
+    ],
+    "*.jsx": [
+      "prettier --single-quote --es5 --write",
+      "git add"
     ]
   }
-}
+}

+ 1 - 1
src/components/Tabs/ContentView.js

@@ -1,4 +1,4 @@
-import React from 'react'
+import React from 'react';
 
 const ContentView = props => <div className="tabContent">{props.content}</div>;
 

+ 1 - 1
src/components/Tabs/TabView.jsx

@@ -1,6 +1,6 @@
 import React from 'react';
 import PropTypes from 'prop-types';
-import ContentView from './ContentView'
+import ContentView from './ContentView';
 
 const data = {
   tabs: ['One', 'Two', 'Three'],

+ 15 - 16
src/components/Tabs/index.js

@@ -1,20 +1,19 @@
-import React from 'react'
-import TabView from './TabView'
-import SharedTitle from '../Utils/SharedTitle.jsx'
+import React from 'react';
+import TabView from './TabView';
+import SharedTitle from '../Utils/SharedTitle.jsx';
 
-import './style.css'
+import './style.css';
 
-const TabViewDemo = () => (
+const TabViewDemo = () =>
   <div>
-    <SharedTitle/>
-     <p>
-          The navigation bar is itself a tab view, althoug it is constructed
-          with react-route to update URL. The following is a pure tab view that
-          does not interfere with URL.
-     </p>
-     <hr/>
-     <TabView/>
-  </div>
-)
+    <SharedTitle />
+    <p>
+      The navigation bar is itself a tab view, althoug it is constructed
+      with react-route to update URL. The following is a pure tab view that
+      does not interfere with URL.
+    </p>
+    <hr />
+    <TabView />
+  </div>;
 
-export default TabViewDemo
+export default TabViewDemo;