Skip to content

Commit

Permalink
[field] fix image diff removed style
Browse files Browse the repository at this point in the history
  • Loading branch information
vicmeow authored and rexxars committed Oct 6, 2020
1 parent 71020eb commit fb7f382
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

.annotation {
border-radius: var(--border-radius-small);
@nest &[data-action='removed'] {
text-decoration: line-through;
}
}

.imageDiff {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ export const ImageFieldDiff: DiffComponent<ObjectDiff<Image>> = ({diff, schemaTy
<DiffAnnotationTooltip diff={diff} path={annotationPath}>
<div className={styles.imageDiff} data-diff-layout={prev && next ? 'double' : 'single'}>
{prev && (
<div className={styles.annotation} style={style}>
<div
className={styles.annotation}
style={style}
data-action={didAssetChange ? 'removed' : 'changed'}
>
<ImagePreview
value={prev}
action={didAssetChange ? 'removed' : 'changed'}
Expand All @@ -59,7 +63,11 @@ export const ImageFieldDiff: DiffComponent<ObjectDiff<Image>> = ({diff, schemaTy
)}
{prev && next && <DiffArrow />}
{next && (
<div className={styles.annotation} style={style}>
<div
className={styles.annotation}
style={style}
data-action={didAssetChange ? 'added' : 'changed'}
>
<ImagePreview
value={next}
action={didAssetChange ? 'added' : 'changed'}
Expand Down

0 comments on commit fb7f382

Please sign in to comment.