-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Created basic wizard with static navigator. Updated react dependency from 16.2 to 16.3 in order to support getDerivedStateFromProps. * Updated tsconfig to generate declaration files automatically * Set rollup as module bundler instead of using tsc. * Added example project. * Added and configured github pages to deploy example project. * Updated license information * Moved default wizard navigator to a separate component. * Created wizard context and exposed consumers using render prop and higher order component APIs * Created Wizard Navigator and Steps compound components. Provided render props API to Navigator component in order to increase flexibility. * Moved children prop validation from render method to propTypes. * Updated how to get the total steps number considering the implementation of Steps compound component. * Moved totalStep calculation from getDerivedStateFromProps to constructor in order to improve performance. Refactored wizard state shape to provide boolean flags that reflects steps availability when navigating * Added onStepChange event handler. * Added step tracker * Refactored project structure * Removed Wizard's class constructor. * Added eslint * Refactored to comply with the ESLint rules * Added precommit validation using git hooks * Moved scripts.precommit to husky.hooks.pre-commit * Updated README
- Loading branch information
1 parent
64691e4
commit 315cdd8
Showing
30 changed files
with
13,856 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
build | ||
coverage | ||
lib | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
"parser": "@typescript-eslint/parser", | ||
"env": { | ||
"browser": true, | ||
"jest": true, | ||
"node": true | ||
}, | ||
"extends": ["airbnb", "prettier", "prettier/react"], | ||
"plugins": ["@typescript-eslint", "prettier"], | ||
"rules": { | ||
"@typescript-eslint/explicit-member-accessibility": 0, | ||
"@typescript-eslint/explicit-function-return-type": 0, | ||
"@typescript-eslint/no-unused-vars": ["error", { "args": "none" }], | ||
"import/no-extraneous-dependencies": [ | ||
"error", | ||
{ | ||
"devDependencies": true | ||
} | ||
], | ||
"lines-between-class-members": [ | ||
"error", | ||
"always", | ||
{ "exceptAfterSingleLine": true } | ||
], | ||
"prettier/prettier": [ | ||
"error", | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
} | ||
], | ||
"react/jsx-filename-extension": [ | ||
"warn", | ||
{ | ||
"extensions": [".js", ".jsx", ".ts", "tsx"] | ||
} | ||
], | ||
"react/jsx-fragments": ["error", "element"], | ||
"react/jsx-props-no-spreading": [ | ||
"error", | ||
{ | ||
"custom": "ignore" | ||
} | ||
], | ||
"react/sort-comp": [ | ||
"warn", | ||
{ | ||
"order": [ | ||
"static-variables", | ||
"static-methods", | ||
"lifecycle", | ||
"everything-else", | ||
"state", | ||
"render" | ||
] | ||
} | ||
], | ||
"react/state-in-constructor": ["error", "never"], | ||
"react/static-property-placement": ["warn", "static public field"] | ||
}, | ||
"parserOptions": { | ||
"ecmaFeatures": { | ||
"modules": true, | ||
"jsx": true | ||
} | ||
}, | ||
"settings": { | ||
"import/resolver": { | ||
"node": { | ||
"paths": ["src"], | ||
"extensions": [".ts", ".tsx"] | ||
} | ||
}, | ||
"react": { | ||
"pragma": "React", | ||
"version": "detect" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"*.+(ts|tsx)": ["eslint"], | ||
"*.+(js|jsx|json|yml|yaml|css|less|scss|ts|tsx|md|graphql|mdx)": [ | ||
"prettier --write", | ||
"git add" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ | |
.git | ||
.npmrc | ||
.prettier* | ||
example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
node_modules | ||
build | ||
coverage | ||
lib | ||
node_modules | ||
package-lock.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.