Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mshenfield/react-github-corners

A fresher "Fork me on Github" callout ported to React
https://github.com/mshenfield/react-github-corners

github-corner react

Last synced: about 13 hours ago
JSON representation

A fresher "Fork me on Github" callout ported to React

Awesome Lists containing this project

README

        

# React Github Corners
A small React wrapper around [@tholman](https://github.com/tholman)'s [github-corners](https://github.com/tholman/github-corners). See [the example site](http://tholman.com/github-corners/) to see the corner live with the smal animations.

## Installation
Add `react-github-corners` to your project from npm using your favorite package management tool

## Usage
If you have [Webpack](https://webpack.js.org/) configured to [load CSS](https://webpack.github.io/docs/stylesheets.html) and [transpile JSX](https://github.com/babel/babel-loader), this can simply be imported and used. This also plays nice with [create-react-app](https://github.com/facebookincubator/create-react-app).

```js
import GithubCorner from 'react-github-corners'
import 'react-github-corners/dist/GithubCorner.css'

const App = (props) => ()
```

You can override the color using the `color` and `backgroundColor` props:

```js
const App = (props) => ()
```

Class names try to follow [BEM](http://getbem.com/introduction/) principles, so you can dig around the source code to find the class names and take direct control of the components using plain CSS. You can also override the SVG style by passing an `svgStyle` attribute to your component:

```js
const App = (props) => ( Naturally, these aren't built by GitHub, or endorsed by them.

Ditto for this.

Copyright (c) 2016 Tim Holman