-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,60 +4,31 @@ React GitHub Fork Ribbon | |
|
||
Pure inline style github fork ribbon on React component. The inline style css is from ["Fork me on GitHub" CSS ribbon](http://simonwhitaker.github.io/github-fork-ribbon-css/). | ||
|
||
| | React = 0.12 | React >= 0.13 | | ||
| ------- | ------------ | ------------- | | ||
| Version | <= 0.2 | >= 0.3 | | ||
| | React = 0.12 | React = 0.13 | React >= 0.14 | | ||
| ------- | ------------ | ------------- | ------------- | | ||
| Version | <= 0.2 | >= 0.3 < 0.5 | >= 0.5 | | ||
|
||
## Usage | ||
|
||
```sh | ||
npm install react-github-fork-ribbon | ||
``` | ||
|
||
Ex. React 0.14 | ||
Ex. React 15.5 | ||
```js | ||
var React = require('react'); | ||
var ReactDOM = require('react-dom'); | ||
var GitHubForkRibbon = require('react-github-fork-ribbon'); | ||
|
||
var Content = React.createClass({ | ||
|
||
render: function () { | ||
return ( | ||
<GitHubForkRibbon href="//www.google.com" | ||
target="_blank" | ||
position="right"> | ||
Fork me on GitHub | ||
</GitHubForkRibbon> | ||
); | ||
} | ||
}); | ||
|
||
ReactDOM.render( | ||
<Content />, | ||
document.getElementById('content') | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import GitHubForkRibbon from 'react-github-fork-ribbon'; | ||
|
||
const Content = () => ( | ||
<GitHubForkRibbon href="//www.google.com" | ||
target="_blank" | ||
position="right"> | ||
Fork me on GitHub | ||
</GitHubForkRibbon> | ||
); | ||
``` | ||
|
||
Ex. React 0.13 | ||
```js | ||
var React = require('react'); | ||
var GitHubForkRibbon = require('react-github-fork-ribbon'); | ||
|
||
var Content = React.createClass({ | ||
|
||
render: function () { | ||
return ( | ||
<GitHubForkRibbon href="//www.google.com" | ||
target="_blank" | ||
position="right"> | ||
Fork me on GitHub | ||
</GitHubForkRibbon> | ||
); | ||
} | ||
}); | ||
|
||
React.render( | ||
ReactDOM.render( | ||
<Content />, | ||
document.getElementById('content') | ||
); | ||
|
@@ -91,6 +62,12 @@ It has four color. | |
|
||
## Release Notes | ||
|
||
### Version 0.5.0 - 2017/04/11 | ||
|
||
- Drop react 0.13 support | ||
- Support react 15.5 for preparing upgrade to react 16 | ||
- Add jest for snapshot testing | ||
|
||
### Version 0.4.5 - 2017/03/11 | ||
|
||
- Refactor position and color set function | ||
|
@@ -148,7 +125,7 @@ It has four color. | |
|
||
The MIT License (MIT) | ||
|
||
Copyright (c) 2015 Lee < [email protected] > | ||
Copyright (c) 2015-2017 Lee < [email protected] > | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy of | ||
this software and associated documentation files (the "Software"), to deal in | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters