Skip to content

Commit

Permalink
Merge pull request #266 from wingkwong/develop
Browse files Browse the repository at this point in the history
0.8.2 Release
  • Loading branch information
wingkwong authored May 19, 2024
2 parents d0620bb + 88fbf7d commit ccb8a58
Show file tree
Hide file tree
Showing 8 changed files with 1,961 additions and 1,153 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# CHANGELOG

## 0.8.2

- Bumped dependencies
- Fixed missing locale text in answers dropdown filter

## 0.8.1

- Bumped dependencies
Expand Down
4 changes: 2 additions & 2 deletions dist/index.es.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/bundle.js

Large diffs are not rendered by default.

3,068 changes: 1,929 additions & 1,139 deletions package-lock.json

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "react-quiz-component",
"version": "0.8.1",
"version": "0.8.2",
"description": "React Quiz Component",
"main": "dist/index.js",
"module": "dist/index.es.js",
Expand Down Expand Up @@ -31,8 +31,8 @@
"@rollup/plugin-replace": "^5.0.5",
"@rollup/plugin-terser": "^0.4.4",
"babel-loader": "^9.1.3",
"css-loader": "^6.0.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"css-loader": "^7.0.0",
"css-minimizer-webpack-plugin": "^7.0.0",
"eslint": "^8.4.1",
"eslint-config-airbnb": "^19.0.2",
"eslint-plugin-import": "^2.25.3",
Expand All @@ -47,8 +47,8 @@
"rollup-plugin-postcss": "^4.0.2",
"terser-webpack-plugin": "^5.3.9",
"webpack": "^5.69.1",
"webpack-cli": "^4.9.2",
"webpack-dev-server": "^4.7.4"
"webpack-cli": "^5.1.4",
"webpack-dev-server": "^5.0.0"
},
"author": "WK Wong <wingkwong.code@gmail.com>",
"homepage": "https://github.com/wingkwong/react-quiz-component",
Expand Down
14 changes: 12 additions & 2 deletions src/lib/core-components/QuizResultFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) {
};

const selectedOptionClass = isOpen ? 'selected-open' : '';
const selectedValuesLocale = {
all: appLocale.resultFilterAll,
correct: appLocale.resultFilterCorrect,
incorrect: appLocale.resultFilterIncorrect,
unanswered: appLocale.resultFilterUnanswered,
};

useEffect(() => {
const handleOutsideClick = (e) => {
if (isOpen && dropdownRef.current && !dropdownRef.current.contains(e.target)) {
if (
isOpen
&& dropdownRef.current
&& !dropdownRef.current.contains(e.target)
) {
setIsOpen(false);
}
};
Expand All @@ -44,7 +54,7 @@ function QuizResultFilter({ filteredValue, handleChange, appLocale }) {
tabIndex={0}
>
<div className={`selected-option ${selectedOptionClass}`}>
{filteredValue === 'all' ? appLocale.resultFilterAll : filteredValue}
{selectedValuesLocale[filteredValue]}
</div>
<span className={`arrow ${isOpen ? 'up' : 'down'}`} />
</div>
Expand Down
7 changes: 5 additions & 2 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ module.exports = {
extensions: ['', '.js', '.jsx'],
},
devServer: {
static: path.join(__dirname, 'docs'),
port: 8000,
static: {
directory: path.join(__dirname, 'docs'),
},
compress: true,
port: 8080,
},
};

0 comments on commit ccb8a58

Please sign in to comment.