Skip to content

Commit

Permalink
Unify size props
Browse files Browse the repository at this point in the history
Sice it's an SVG and its a square, needs always the same value for width and height.
  • Loading branch information
elrumordelaluz committed Oct 23, 2017
1 parent 0d4f71a commit 22c20b9
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/lib/GithubCorner.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ const githubCornerStyles = getGithubCornerStyles();
export default class GithubCorner extends Component {
static propTypes = {
href: PropTypes.string,
width: PropTypes.number,
height: PropTypes.number,
size: PropTypes.oneOfType([
PropTypes.number,
PropTypes.string
]),
direction: PropTypes.string,
octoColor: PropTypes.string,
bannerColor: PropTypes.string,
Expand All @@ -27,8 +29,7 @@ export default class GithubCorner extends Component {
};
static defaultProps = {
href: '/',
width: 80,
height: 80,
size: 80,
direction: 'right',
octoColor: '#fff',
bannerColor: '#151513',
Expand All @@ -51,8 +52,7 @@ export default class GithubCorner extends Component {
render() {
const {
href,
width,
height,
size,
direction,
octoColor,
bannerColor,
Expand Down Expand Up @@ -98,8 +98,8 @@ export default class GithubCorner extends Component {
aria-label={ariaLabel}
>
<svg
width={width}
height={height}
width={size}
height={size}
viewBox="0 0 250 250"
style={mainStyle}
>
Expand Down

0 comments on commit 22c20b9

Please sign in to comment.