Merge pull request #12 from Jinksi/storybook

Add options to GithubCorner
This commit is contained in:
Eric Jinks 2018-02-07 13:46:41 +10:00 committed by GitHub
commit ce0c3ba227
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 4 deletions

View file

@ -5,7 +5,6 @@
z-index: 2;
}
.GithubCorner svg {
fill: #151513;
color: #fff;
border: 0;
max-width: 12.5vmin;

View file

@ -1,9 +1,20 @@
import React from 'react'
import './GithubCorner.css'
export default ({ url }) => (
<a className='GithubCorner' href={url} aria-label='View source on Github'>
<svg width='80' height='80' viewBox='0 0 250 250' aria-hidden='true'>
export default ({ url, style, className = '', color = '#151513' }) => (
<a
className={`GithubCorner ${className}`}
href={url}
aria-label='View source on Github'
style={style}
>
<svg
width='80'
height='80'
viewBox='0 0 250 250'
aria-hidden='true'
fill={color}
>
<path d='M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z' />
<path
className='octo-arm'