Skip to content

Commit

Permalink
fix: Make popup-action stay open when clicked (#366)
Browse files Browse the repository at this point in the history
* Fix a bug where Popup state would not stick when clicked.
  • Loading branch information
bradcypert committed Nov 5, 2020
1 parent ad2eced commit caae48f
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
- `Fixed` for any bug fixes.
- `Security`

## [3.9.0] - 2020-11-03
## [3.9.2] - 2020-11-04
- https://github.com/teamsnap/teamsnap-ui/pull/366
- `Fixed` Popup component - popup would not "stick" when trigger was clicked.
- `Security` Bumped a dependency on object-path to resolve a known vulnerability in that dependency.

## [3.9.1] - 2020-11-03
- https://github.com/teamsnap/teamsnap-ui/pull/365
- `Changed` Avatar component - Mods no longer a required prop
- `Changed` Avatar component - Image should now fill the parent even if smaller than the parent.
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@teamsnap/teamsnap-ui",
"version": "3.9.1",
"version": "3.9.2",
"description": "a CSS component library for TeamSnap",
"main": "dist/js/index.js",
"types": "dist/js/index.d.ts",
Expand Down
3 changes: 1 addition & 2 deletions src/js/components/Popup/PopupAction.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as React from "react";
import * as PropTypes from "prop-types";


interface State {
isPopupOpen: boolean;
isConfirmOpen: boolean;
Expand Down Expand Up @@ -78,7 +77,7 @@ export default class PopUpAction extends React.Component<PropTypes.InferProps<ty
{this.props.text}
</button>
<div
className={"Popup-container " + dirString}
className={`Popup-container ${dirString} ${this.state.isPopupOpen ? "is-open" : ""}`}
style={this.props.popupStyle}
>
<div className="Popup-content">
Expand Down

0 comments on commit caae48f

Please sign in to comment.