diff --git a/frontend/src/containers/app.js b/frontend/src/containers/app.js index 9b5c5605..758d09de 100644 --- a/frontend/src/containers/app.js +++ b/frontend/src/containers/app.js @@ -5,8 +5,6 @@ const ReactRouter = require('react-router'); const actions = require('@state/actions'); const Home = require('@containers/home'); const NotFound = require('@containers/not-found'); -const Header = require('@components/header'); - const { updateRouter diff --git a/frontend/test/index.js b/frontend/test/index.js index e9732030..46d94490 100644 --- a/frontend/test/index.js +++ b/frontend/test/index.js @@ -1,10 +1,4 @@ const test = require('ava'); -const enzyme = require('enzyme'); -const React = require('react'); - -const { - shallow -} = enzyme; test('noop', (t) => { t.deepEqual(1, 1); diff --git a/ui/Makefile b/ui/Makefile index 04ecf876..15261cad 100644 --- a/ui/Makefile +++ b/ui/Makefile @@ -58,7 +58,7 @@ clean: .PHONY: lint lint: $(bindir)/eslint . - $(bindir)/stylelint './src/**/*.js' + -$(bindir)/stylelint './src/**/*.js' .PHONY: lint-ci lint-ci: diff --git a/ui/docs/src/containers/app/index.js b/ui/docs/src/containers/app/index.js index d929a8f2..2c09fa0b 100644 --- a/ui/docs/src/containers/app/index.js +++ b/ui/docs/src/containers/app/index.js @@ -2,63 +2,13 @@ */ const React = require('react'); -const ReactRouter = require('react-router'); - -const Navigation = require('./navigation.js'); -const Home = require('../home'); -const Item = require('../item/'); const { Base, - Container, - Row, - Column } = require('@ui'); -const { - Match -} = ReactRouter; - -const styles = { - base: { - backgroundColor: '#FFEBEE' - }, - row: { - backgroundColor: '#EF5350' - }, - column: { - backgroundColor: '#B71C1C', - textAlign: 'center', - color: 'white' - } -}; - module.exports = () => { return ( - - - - - - - - - 1 - 2 - 3 - - - - - + ); }; diff --git a/ui/docs/src/mds.js b/ui/docs/src/mds.js index ba98748d..df310924 100644 --- a/ui/docs/src/mds.js +++ b/ui/docs/src/mds.js @@ -4,7 +4,7 @@ module.exports = { Overview: require('@ui/guidelines/overview.md'), Layout: require('@ui/guidelines/layout.md') }, - Components: { + // Components: { // Avatar: require('@ui/components/avatar/readme.md'), // Base: require('@ui/components/base/readme.md'), // Container: require('@ui/components/container/readme.md'), @@ -26,6 +26,6 @@ module.exports = { // Widget: require('@ui/components/widget/readme.md'), // Pagination: require('@ui/components/pagination/readme.md'), // Modal: require('@ui/components/modal/readme.md') - }, + // }, FAQ: require('@ui/faq.md') }; diff --git a/ui/docs/webpack/base.js b/ui/docs/webpack/base.js index 4eefc21a..6066551e 100644 --- a/ui/docs/webpack/base.js +++ b/ui/docs/webpack/base.js @@ -1,5 +1,4 @@ const path = require('path'); -const fs = require('fs'); const plugins = require('./plugins'); diff --git a/ui/docs/webpack/plugins.js b/ui/docs/webpack/plugins.js index 9a87d9f6..3d7545c5 100644 --- a/ui/docs/webpack/plugins.js +++ b/ui/docs/webpack/plugins.js @@ -1,5 +1,4 @@ const webpack = require('webpack'); -const path = require('path'); const pkg = require('../package.json'); diff --git a/ui/docs/webpack/production.js b/ui/docs/webpack/production.js index 45341f5e..a3e8b207 100644 --- a/ui/docs/webpack/production.js +++ b/ui/docs/webpack/production.js @@ -1,5 +1,3 @@ -const path = require('path'); - const plugins = require('./plugins'); const base = require('./base'); diff --git a/ui/package.json b/ui/package.json index 8ec67f78..68dd6ac0 100644 --- a/ui/package.json +++ b/ui/package.json @@ -55,9 +55,6 @@ "pre-commit": "^1.1.3", "react-addons-test-utils": "^15.4.1", "st": "^1.2.0", - "stylelint": "^7.6.0", - "stylelint-config-standard": "^15.0.0", - "stylelint-processor-styled-components": "^0.0.4", "tap-xunit": "^1.4.0" }, "ava": { diff --git a/ui/src/components/base/index.js b/ui/src/components/base/index.js index b8919bda..7d8b91aa 100644 --- a/ui/src/components/base/index.js +++ b/ui/src/components/base/index.js @@ -13,7 +13,8 @@ const { } = Styled; module.exports = styled.div` - font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; + font-family: -apple-system, BlinkMacSystemFont, + "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; font-size: 1rem; line-height: 1.5; color: #373A3C; diff --git a/ui/src/components/button/index.js b/ui/src/components/button/index.js index 1023488d..aaabba3c 100644 --- a/ui/src/components/button/index.js +++ b/ui/src/components/button/index.js @@ -14,7 +14,6 @@ const { const { default: styled, - css } = Styled; // TODO: this should come from constants diff --git a/ui/src/components/checkbox/index.js b/ui/src/components/checkbox/index.js index c6110a39..311c4960 100644 --- a/ui/src/components/checkbox/index.js +++ b/ui/src/components/checkbox/index.js @@ -1,28 +1,15 @@ -const classNames = require('classnames'); const React = require('react'); const constants = require('../../shared/constants'); -const fns = require('../../shared/functions'); -const match = require('../../shared/match'); const Styled = require('styled-components'); const { - colors, boxes } = constants; -const { - remcalc -} = fns; - const { default: styled, - css } = Styled; -const styles = { - ...colors -}; - const StyledInput = styled.input` visibility: hidden; &:checked + label::after { diff --git a/ui/src/components/column/index.js b/ui/src/components/column/index.js index 32bfabe3..28041b99 100644 --- a/ui/src/components/column/index.js +++ b/ui/src/components/column/index.js @@ -19,13 +19,10 @@ const { const { default: styled, - css } = Styled; const padding = sizes.halfGutterWidth || '0.5rem'; -const direction = (props) => props.reverse ? 'flex-direction' : 'row'; - const width = (fallback) => (size) => (props) => { return !isUndefined(props[size]) ? calc(`(${props[size]} / ${sizes.gridColumns}) * 100%`) diff --git a/ui/src/components/container/index.js b/ui/src/components/container/index.js index 072b9738..c6c53d67 100644 --- a/ui/src/components/container/index.js +++ b/ui/src/components/container/index.js @@ -3,7 +3,7 @@ * github.com/roylee0704/react-flexbox-grid/blob/master/src/components/Grid.js */ -const constants = require('../../shared/constants') +const constants = require('../../shared/constants'); const Styled = require('styled-components'); const { diff --git a/ui/src/components/row/index.js b/ui/src/components/row/index.js index 9f95e3da..1d2bbc09 100644 --- a/ui/src/components/row/index.js +++ b/ui/src/components/row/index.js @@ -41,10 +41,10 @@ const alignItems = (size) => match(sizeMatch(size, { bottom: 'flex-end' }), 'stretch'); -const order = (size) => match(sizeMatch(size, { - first: -1, - last: 1 -}), 0); +// const order = (size) => match(sizeMatch(size, { +// first: -1, +// last: 1 +// }), 0); /** * ```html diff --git a/ui/stories/Button.js b/ui/stories/Button.js deleted file mode 100644 index 5662b882..00000000 --- a/ui/stories/Button.js +++ /dev/null @@ -1,27 +0,0 @@ -import React from 'react'; - -const buttonStyles = { - border: '1px solid #eee', - borderRadius: 3, - backgroundColor: '#FFFFFF', - cursor: 'pointer', - fontSize: 15, - padding: '3px 10px', - margin: 10, -}; - -const Button = ({ children, onClick }) => ( - -); - -Button.propTypes = { - children: React.PropTypes.string.isRequired, - onClick: React.PropTypes.func, -}; - -export default Button; diff --git a/ui/stories/Welcome.js b/ui/stories/Welcome.js deleted file mode 100644 index d126acbb..00000000 --- a/ui/stories/Welcome.js +++ /dev/null @@ -1,72 +0,0 @@ -import React from 'react'; - -const styles = { - main: { - margin: 15, - maxWidth: 600, - lineHeight: 1.4, - fontFamily: '"Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif', - }, - - logo: { - width: 200, - }, - - link: { - color: '#1474f3', - textDecoration: 'none', - borderBottom: '1px solid #1474f3', - paddingBottom: 2, - }, - - code: { - fontSize: 15, - fontWeight: 600, - padding: "2px 5px", - border: "1px solid #eae9e9", - borderRadius: 4, - backgroundColor: '#f3f2f2', - color: '#3a3a3a', - }, -}; - -export default class Welcome extends React.Component { - showApp(e) { - e.preventDefault(); - if(this.props.showApp) this.props.showApp(); - } - - render() { - return ( -
-

Welcome to STORYBOOK

-

- This is a UI component dev environment for your app. -

-

- We've added some basic stories inside the src/stories directory. -
- A story is a single state of one or more UI components. You can have as many stories as you want. -
- (Basically a story is like a visual test case.) -

-

- See these sample stories for a component called Button. -

-

- Just like that, you can add your own components as stories. -
- You can also edit those components and see changes right away. -
- (Try editing the Button component - located at src/stories/Button.js.) -

-

- This is just one thing you can do with Storybook. -
- Have a look at the React Storybook repo for more information. -

-
- ); - } -} diff --git a/ui/stories/index.js b/ui/stories/index.js index 9ab6e1a2..12b4d2e0 100644 --- a/ui/stories/index.js +++ b/ui/stories/index.js @@ -1,8 +1,8 @@ const React = require('react'); const { storiesOf, - action, - linkTo + // action, + // linkTo } = require('@kadira/storybook'); const { @@ -69,12 +69,16 @@ storiesOf('Grid', module) )); +const profile = + 'https://pbs.twimg.com/profile_images/' + + '641289584580493312/VBfsPlff_400x400.jpg'; + storiesOf('Avatar', module) .add('Avatar Picture', () => ( )) .add('Avatar Text', () => (