From 4689f3471bef18021e856f1286c7d1510f88ad38 Mon Sep 17 00:00:00 2001 From: Lionel T Date: Mon, 23 Oct 2017 22:39:50 +0200 Subject: [PATCH] Add style prop Allow to customize more the gh-corner like: ``` ``` to made the octocat trasnparent. Details in [this issue](https://github.com/tholman/github-corners/issues/15). --- src/lib/GithubCorner.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/lib/GithubCorner.js b/src/lib/GithubCorner.js index 2a70030..dc98e68 100644 --- a/src/lib/GithubCorner.js +++ b/src/lib/GithubCorner.js @@ -25,7 +25,8 @@ export default class GithubCorner extends Component { octoColor: PropTypes.string, bannerColor: PropTypes.string, ariaLabel: PropTypes.string, - className: PropTypes.string + className: PropTypes.string, + style: PropTypes.object }; static defaultProps = { href: '/', @@ -58,6 +59,7 @@ export default class GithubCorner extends Component { bannerColor, ariaLabel, className, + style, ...otherProps } = this.props; const mainStyle = { @@ -101,7 +103,10 @@ export default class GithubCorner extends Component { width={size} height={size} viewBox="0 0 250 250" - style={mainStyle} + style={{ + ...mainStyle, + ...style, + }} >