diff --git a/lib/happo/public/HappoDiffs.jsx b/lib/happo/public/HappoDiffs.jsx
index ffa1a85..9b75507 100644
--- a/lib/happo/public/HappoDiffs.jsx
+++ b/lib/happo/public/HappoDiffs.jsx
@@ -178,14 +178,43 @@ Swiper.propTypes = {
current: PropTypes.string.isRequired,
};
+function SideBySide({ previous, current }) {
+ return (
+
+
+
+
+ Before
+
+
+ {' '}
+
+
+
+ After
+
+
+
+ );
+}
+SideBySide.propTypes = {
+ previous: PropTypes.string.isRequired,
+ current: PropTypes.string.isRequired,
+};
+
function SelectedView({ image, selectedView }) {
if (selectedView === VIEWS.SIDE_BY_SIDE) {
return (
-
-
- {' '}
-
-
+
);
}
diff --git a/lib/happo/public/happo-styles.css b/lib/happo/public/happo-styles.css
index 2833318..58986f1 100644
--- a/lib/happo/public/happo-styles.css
+++ b/lib/happo/public/happo-styles.css
@@ -107,3 +107,26 @@ body {
.Swiper__image {
pointer-events: none;
}
+
+.SideBySide__image {
+ display: inline-block;
+ line-height: 0;
+ position: relative;
+}
+
+.SideBySide__caption {
+ background-color: #666666;
+ bottom: 0;
+ color: #ffffff;
+ font-size: 10px;
+ line-height: 1;
+ opacity: 0;
+ padding: 3px 6px;
+ position: absolute;
+ right: 0;
+ transition: opacity .2s;
+}
+
+.SideBySide__image:hover .SideBySide__caption {
+ opacity: 1;
+}