2018-01-30 11:53:12 -05:00
|
|
|
const classNames = require('classnames');
|
|
|
|
const FormattedMessage = require('react-intl').FormattedMessage;
|
|
|
|
const PropTypes = require('prop-types');
|
|
|
|
const React = require('react');
|
2016-11-07 15:07:07 -05:00
|
|
|
|
2016-11-09 09:28:59 -05:00
|
|
|
require('../forms/button.scss');
|
2016-11-07 15:07:07 -05:00
|
|
|
require('./ttt-tile.scss');
|
|
|
|
|
2018-01-30 11:53:12 -05:00
|
|
|
const TTTTile = props => (
|
|
|
|
<div className={classNames('ttt-tile', props.className)}>
|
|
|
|
<a href={props.tutorialLoc}>
|
|
|
|
<div className="ttt-tile-tutorial">
|
|
|
|
<div className="ttt-tile-image">
|
|
|
|
<img
|
|
|
|
alt=""
|
|
|
|
className="ttt-tile-image-img"
|
|
|
|
src={props.thumbUrl}
|
|
|
|
/>
|
|
|
|
<div className="ttt-tile-image-try">
|
|
|
|
<div className="button mod-ttt-try-button">
|
|
|
|
<FormattedMessage id="tile.tryIt" />
|
2018-01-30 09:54:45 -05:00
|
|
|
</div>
|
2016-12-20 12:06:58 -05:00
|
|
|
</div>
|
2018-01-30 11:53:12 -05:00
|
|
|
</div>
|
|
|
|
<div className="ttt-tile-info">
|
2018-01-19 14:06:26 -05:00
|
|
|
|
2018-01-30 11:53:12 -05:00
|
|
|
<div className="ttt-tile-tag">
|
|
|
|
<FormattedMessage
|
|
|
|
defaultMessage="Tutorial"
|
|
|
|
id="ttt.tutorial"
|
|
|
|
/>
|
2018-01-30 09:54:45 -05:00
|
|
|
</div>
|
2018-01-30 11:53:12 -05:00
|
|
|
<h4 className="ttt-tile-title">{props.title}</h4>
|
|
|
|
<p className="ttt-tile-description">
|
|
|
|
{props.description}
|
|
|
|
</p>
|
|
|
|
</div>
|
2018-01-19 14:06:26 -05:00
|
|
|
</div>
|
2018-01-30 11:53:12 -05:00
|
|
|
|
|
|
|
</a>
|
|
|
|
{props.onGuideClick && (
|
|
|
|
<div
|
|
|
|
className="ttt-tile-guides"
|
|
|
|
onClick={props.onGuideClick}
|
|
|
|
>
|
|
|
|
<FormattedMessage
|
|
|
|
defaultMessage="See Cards and Guides"
|
|
|
|
id="tile.guides"
|
|
|
|
/>
|
|
|
|
<img
|
|
|
|
className="ttt-tile-open-modal"
|
|
|
|
src="/svgs/modal/open-blue.svg"
|
|
|
|
/>
|
|
|
|
</div>
|
|
|
|
)}
|
|
|
|
</div>
|
|
|
|
);
|
|
|
|
|
|
|
|
TTTTile.propTypes = {
|
|
|
|
className: PropTypes.string,
|
|
|
|
description: PropTypes.string,
|
|
|
|
onGuideClick: PropTypes.func,
|
|
|
|
thumbUrl: PropTypes.string.isRequired,
|
|
|
|
title: PropTypes.string.isRequired,
|
|
|
|
tutorialLoc: PropTypes.string.isRequired
|
|
|
|
};
|
2016-11-07 15:07:07 -05:00
|
|
|
|
|
|
|
module.exports = TTTTile;
|