Skip to content

Commit

Permalink
fix(ui): fix swipe for article cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ncarlier committed Apr 21, 2019
1 parent 861afca commit 13577cb
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/src/articles/components/ArticleList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default (props: Props) => {
{articles.map(article => (
<li key={`article-${article.id}`}>
{
isMobileDisplay ?
isMobileDisplay && !article.isOffline ?
<SwipeableArticleCard article={article} readMoreBasePath={basePath} /> :
<ArticleCard article={article} readMoreBasePath={basePath} />
}
Expand Down
5 changes: 4 additions & 1 deletion ui/src/articles/components/SwipeableArticleCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,10 @@ export const SwipeableArticleCard = (props: AllProps) => {
const bgIcon = article.status === 'read' ? 'undo' : 'done'

return (
<SwipeToDelete background={<Background icon={bgIcon} />} onDelete={handleOnDelete}>
<SwipeToDelete
background={<Background icon={bgIcon} />}
deleteSwipe={0.3}
onDelete={handleOnDelete}>
<ArticleCard article={article} readMoreBasePath={readMoreBasePath} />
</SwipeToDelete>
)
Expand Down
1 change: 1 addition & 0 deletions ui/src/common/ButtonIcon.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
bottom: 30px;
right: 30px;
box-shadow: 0px 2px 5px #666;
z-index: 999;
}

@keyframes rotate {
Expand Down

0 comments on commit 13577cb

Please sign in to comment.