Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/habit card component #1

Open
wants to merge 22 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4e939fc
chore: supress react/prop-types rule in eslint
eowfenth Apr 14, 2018
62a7d6d
feat: add inicial implementation for HabitCard
eowfenth Apr 14, 2018
f3dc32d
feat: rewrite App to use HabitCard
eowfenth Apr 14, 2018
24fc0aa
Merge branch 'master' into feature/habit-card-component
eowfenth Apr 14, 2018
7d8cf7a
chore: add prettier and related packages
eowfenth Apr 14, 2018
b85db21
lint: integrate prettier to eslint
eowfenth Apr 14, 2018
e3799ac
lint: adjust format of writing
eowfenth Apr 14, 2018
afe6570
lint: adjust rules for prettier
eowfenth Apr 14, 2018
7bc0ceb
chore: add options for prettier
eowfenth Apr 14, 2018
2db995b
lint: adjust format of typing
eowfenth Apr 14, 2018
451050f
Merge branch 'master' into feature/habit-card-component
eowfenth Apr 15, 2018
5ba036d
eslint: enable react/jsx-no-bind rule
eowfenth Apr 15, 2018
9f2f05a
feat: add initial implementation of DaysOfWeek component
eowfenth Apr 15, 2018
ced38b2
feat: add initial implementation for PopupButton
eowfenth Apr 15, 2018
a3db752
feat: add initial implementation for WeekCalendar component
eowfenth Apr 15, 2018
bbad9ff
refactor: add index components to facilitate imports
eowfenth Apr 15, 2018
d91bf28
refactor: reorder stylesheet for HabitCard
eowfenth Apr 15, 2018
8188e59
refactor: reorganize HabitCard using other components
eowfenth Apr 15, 2018
ffc9098
feat: usage DaysOfWeek component in App
eowfenth Apr 15, 2018
589b86d
chore: rename settings script to be devtools
eowfenth Apr 17, 2018
d698f9d
chore: add coverage/ to gitignore
eowfenth Apr 22, 2018
b78c007
test: update snapshots
eowfenth Apr 22, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 22 additions & 11 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,25 @@
{
"parser": "babel-eslint",
"extends": "airbnb",
"plugins": [
"react"

"parser": "babel-eslint",
"extends": ["airbnb", "prettier/react"],
"plugins": ["react", "prettier"],
"env": {
"jest": true
},
"rules": {
"react/jsx-filename-extension": [
"error",
{
"extensions": [".js", ".jsx"]
}
],
"env": {
"jest": true
},
"rules": {
"react/jsx-filename-extension": ["error", { "extensions": [".js", ".jsx"] }]
}
"react/prop-types": 0,
"react/jsx-no-bind": 1,
"prettier/prettier": [
"error",
{
"singleQuote": true,
"trailingComma": "es5"
}
]
}
}
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,3 +54,6 @@ buck-out/

# Bundle artifact
*.jsbundle

# Jest artifacts
coverage/
49 changes: 16 additions & 33 deletions App.js
Original file line number Diff line number Diff line change
@@ -1,48 +1,31 @@
import React from 'react';
import {
Platform,
StyleSheet,
Text,
View,
} from 'react-native';

const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
import { StyleSheet, View, ScrollView } from 'react-native';
import { DaysOfWeek, HabitCard } from './app/components';

const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
backgroundColor: '#ccc',
},
});

const App = () => (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React Native!
</Text>
<Text style={styles.instructions}>
To get started, edit App.js
</Text>
<Text style={styles.instructions}>
{instructions}
</Text>
<DaysOfWeek />
<ScrollView>
<HabitCard title="Wake up early than 6 am" />
<HabitCard title="Don't miss class" />
<HabitCard title="One new recipe a week" />
<HabitCard title="One pull request a week" />
<HabitCard title="" />
<HabitCard title="Daily production above the six" />
<HabitCard title="2 liters of water a day" />
<HabitCard title="One book per month" />
<HabitCard title="One new movie a week" />
<HabitCard title="One hour one daily knowledge" />
</ScrollView>
</View>
);

Expand Down
Loading