Skip to content

Commit

Permalink
feat: React v16 support
Browse files Browse the repository at this point in the history
  • Loading branch information
antonfisher committed Feb 1, 2018
1 parent f1e7a04 commit 127217b
Show file tree
Hide file tree
Showing 17 changed files with 5,863 additions and 2,432 deletions.
18 changes: 4 additions & 14 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,21 @@
"es6": true
},
"extends": [
"airbnb"
"fbjs",
"plugin:prettier/recommended"
],
"parser": "babel-eslint",
"parserOptions": {
"sourceType": "module"
},
"plugins": [
"prettier",
"jsx-a11y",
"react"
],
"rules": {
"spaced-comment": 0,
"no-underscore-dangle": 0,
"max-len": ["error",120],
"arrow-parens": ["error","always"],
"comma-dangle": ["error","never"],
"object-curly-spacing": ["error","never"],
"import/no-unresolved": 0,
"react/forbid-prop-types": 0,
"react/jsx-filename-extension": 0,
"react/sort-comp": 0
},
"settings": {
"react": {
"version": "15"
"version": "16.2"
}
}
}
9 changes: 9 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.idea
npm-debug.log*
node_modules/
dist/
coverage/
demo/node_modules/
demo/build/
demo/build-dev/
/docs
11 changes: 11 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"printWidth": 120,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"jsxBracketSameLine": false,
"arrowParens": "always"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Anton Fisher
Copyright (c) 2018 Anton Fisher

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Simple React time input field, check out [demo](https://antonfisher.com/react-si
## Installation
```bash
npm install --save react-simple-timefield

#for React <16 use: npm install --save react-simple-timefield@1
```

## Usage
Expand Down Expand Up @@ -57,6 +59,7 @@ class App extends React.Component {
```

## Changelog
* 2.0.0 React v16 support
* 1.3.0 Added custom colon property
* 1.2.0 Added custom input field property
* 1.1.0 Added `showSeconds` property
Expand All @@ -82,7 +85,7 @@ npm run dev
#### Build:
```bash
npm test
npm run lint
npm run format
npm run build
```

Expand Down
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ <h1>react-simple-timefield demos</h1>
</header>
<section id="app"></section>
<footer>
MIT License | 2017 | <a href="https://antonfisher.com">Anton Fisher</a>
MIT License | 2018 | <a href="https://antonfisher.com">Anton Fisher</a>
</footer>
<link href="https://fonts.googleapis.com/css?family=Comfortaa" rel="stylesheet">
</body>
Expand Down
13 changes: 3 additions & 10 deletions demo/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import IconClock from 'material-ui/svg-icons/device/access-time';
import TextField from 'material-ui/TextField';

import TimeField from '../';
//import TimeField from '../src';

class App extends React.Component {
constructor(...args) {
Expand Down Expand Up @@ -105,12 +106,7 @@ class App extends React.Component {
value={timeSeconds}
onChange={this.onTimeChange}
style={{width: 82, fontSize: 20}}
input={(
<TextField
floatingLabelFixed
floatingLabelText="Time"
/>
)}
input={<TextField floatingLabelFixed floatingLabelText="Time" />}
/>
</div>
</MuiThemeProvider>
Expand All @@ -120,7 +116,4 @@ class App extends React.Component {
}
}

ReactDOM.render(
<App />,
document.getElementById('app')
);
ReactDOM.render(<App />, document.getElementById('app'));
Loading

0 comments on commit 127217b

Please sign in to comment.