Skip to content

Commit

Permalink
Add style prop
Browse files Browse the repository at this point in the history
Allow to customize more the gh-corner like:
```
<GithubCorner href={githubUrl}  style={{ 'mixBlendMode': 'darken' }}/>
```
to made the octocat trasnparent.

Details in [this issue](tholman/github-corners#15).
  • Loading branch information
elrumordelaluz committed Oct 23, 2017
1 parent 22c20b9 commit 4689f34
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/GithubCorner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '/',
Expand Down Expand Up @@ -58,6 +59,7 @@ export default class GithubCorner extends Component {
bannerColor,
ariaLabel,
className,
style,
...otherProps
} = this.props;
const mainStyle = {
Expand Down Expand Up @@ -101,7 +103,10 @@ export default class GithubCorner extends Component {
width={size}
height={size}
viewBox="0 0 250 250"
style={mainStyle}
style={{
...mainStyle,
...style,
}}
>
<path className="octo-banner" d={pathBanner} fill={bannerColor} />
<path className="octo-arm" d={pathArm} style={armStyle} />
Expand Down

0 comments on commit 4689f34

Please sign in to comment.