Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion example/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
div#app a {
margin-right:5px;
}
.scoop-it-icon {
display: inline-block;
width: 16px;
height: 16px;
background-image: url('http://www.scoop.it/resources/img/V4/presscoverage/logo/it_24.png')
}
</style>
<script type="text/babel">

Expand All @@ -45,6 +51,7 @@
var TumblrButton = ReactSocial.TumblrButton;
var XingButton = ReactSocial.XingButton;
var EmailButton = ReactSocial.EmailButton;
var ScoopItButton = ReactSocial.ScoopItButton;

var App = React.createClass({
render: function () {
Expand Down Expand Up @@ -82,6 +89,9 @@
<TumblrButton title="Share via Tumblr" message={message} url={link} element="a" className="">
<i className="fa fa-tumblr"/>
</TumblrButton>
<ScoopItButton title="Share via ScoopIt" message={message} url={link} element="a" className="">
<i className="scoop-it-icon" />
</ScoopItButton>
</div>
);
}
Expand All @@ -90,4 +100,4 @@
ReactDOM.render(<App />, document.getElementById('app'));
</script>
</body>
</html>
</html>
10 changes: 10 additions & 0 deletions react-social.js
Original file line number Diff line number Diff line change
Expand Up @@ -608,5 +608,15 @@
}
});

exports.ScoopItButton = createClass({
displayName: 'ScoopItButton'

, mixins: [Button, DefaultBlankTarget]

, constructUrl: function() {
return "https://www.scoop.it/bookmarklet?url=" + encodeURIComponent(this.props.url)
}
});

return exports;
});
4 changes: 4 additions & 0 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,7 @@ test("TumblrButton", function (t) {
test("PocketButton", function (t) {
t.plan(testButton(t, "TumblrButton"));
});

test("ScoopItButton", function (t) {
t.plan(testButton(t, "ScoopItButton"));
});