]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/episodes/Channel.js
sync episode channels
[alttp.git] / resources / js / components / episodes / Channel.js
diff --git a/resources/js/components/episodes/Channel.js b/resources/js/components/episodes/Channel.js
new file mode 100644 (file)
index 0000000..1943753
--- /dev/null
@@ -0,0 +1,30 @@
+import PropTypes from 'prop-types';
+import React from 'react';
+import { Button } from 'react-bootstrap';
+
+import Icon from '../common/Icon';
+
+const Channel = ({ channel }) =>
+       <div className="episode-channel">
+               <Button
+                       href={channel.stream_link}
+                       rel="noreferer"
+                       target="_blank"
+                       title={channel.title}
+                       variant="outline-twitch"
+               >
+                       <Icon.STREAM />
+                       {' '}
+                       {channel.short_name || channel.title}
+               </Button>
+       </div>;
+
+Channel.propTypes = {
+       channel: PropTypes.shape({
+               short_name: PropTypes.string,
+               stream_link: PropTypes.string,
+               title: PropTypes.string,
+       }),
+};
+
+export default Channel;