Skip to content
This repository has been archived by the owner on May 21, 2020. It is now read-only.

Commit

Permalink
feat: override instead of assign drawerStyle
Browse files Browse the repository at this point in the history
  • Loading branch information
Redmega committed Apr 2, 2018
1 parent 431974c commit ed28458
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/drawer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import React from "react";
import PropTypes from "prop-types";
import { Motion, spring } from "react-motion";
import Hammer from "react-hammerjs";
import assign from "1-liners/assign";
import isFunction from "1-liners/isFunction";
import styles from "./styles";

Expand Down Expand Up @@ -199,7 +198,7 @@ export default class Drawer extends React.Component {
this.props
);

let computedStyle = assign(drawer, drawerStyle);
let computedStyle = {...drawer, ...drawerStyle };
if (interpolated.myProp > 0) computedStyle.display = "block";
else computedStyle.display = "none";

Expand Down

0 comments on commit ed28458

Please sign in to comment.