mirror of
https://github.com/status-im/discover-dapps.git
synced 2025-02-27 09:30:40 +00:00
Initial tweaks (#7)
* chore: remove unneeded media category * refactor: better timing on the debounce * style: removed border on catagory selector * style: no horizontal scroll on desktop * style: margin bottom for dapp list * fix: better solution for dapp list margins * style: margin tweaks
This commit is contained in:
parent
2a3d14dda1
commit
888c18985c
@ -4,7 +4,7 @@
|
|||||||
font-family: $font;
|
font-family: $font;
|
||||||
background: $background;
|
background: $background;
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: calculateRem(11) calculateRem(16) 0 calculateRem(16);
|
margin: 0 calculateRem(16) calculateRem(11) calculateRem(16);
|
||||||
}
|
}
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
export const EXCHANGES = 'EXCHANGES'
|
export const EXCHANGES = 'EXCHANGES'
|
||||||
export const MARKETPLACES = 'MARKETPLACES'
|
export const MARKETPLACES = 'MARKETPLACES'
|
||||||
|
export const COLLECTIBLES = 'COLLECTIBLES'
|
||||||
export const GAMES = 'GAMES'
|
export const GAMES = 'GAMES'
|
||||||
export const SOCIAL_NETWORKS = 'SOCIAL_NETWORKS'
|
export const SOCIAL_NETWORKS = 'SOCIAL_NETWORKS'
|
||||||
export const MEDIA = 'MEDIA'
|
|
||||||
export const UTILITIES = 'UTILITIES'
|
export const UTILITIES = 'UTILITIES'
|
||||||
export const OTHER = 'OTHER'
|
export const OTHER = 'OTHER'
|
||||||
export const COLLECTIBLES = 'COLLECTIBLES'
|
|
||||||
|
@ -280,7 +280,7 @@ const Dapps = [
|
|||||||
url: 'http://livepeer.tv/',
|
url: 'http://livepeer.tv/',
|
||||||
description: 'Decentralized video broadcasting',
|
description: 'Decentralized video broadcasting',
|
||||||
image: null,
|
image: null,
|
||||||
category: Categories.MEDIA,
|
category: Categories.SOCIAL_NETWORKS,
|
||||||
dateAdded: null,
|
dateAdded: null,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -11,6 +11,10 @@ describe('categories', () => {
|
|||||||
key: 'MARKETPLACES',
|
key: 'MARKETPLACES',
|
||||||
value: 'Marketplaces',
|
value: 'Marketplaces',
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
key: 'COLLECTIBLES',
|
||||||
|
value: 'Collectibles',
|
||||||
|
},
|
||||||
{
|
{
|
||||||
key: 'GAMES',
|
key: 'GAMES',
|
||||||
value: 'Games',
|
value: 'Games',
|
||||||
@ -19,10 +23,6 @@ describe('categories', () => {
|
|||||||
key: 'SOCIAL_NETWORKS',
|
key: 'SOCIAL_NETWORKS',
|
||||||
value: 'Social Networks',
|
value: 'Social Networks',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'MEDIA',
|
|
||||||
value: 'Media',
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
key: 'UTILITIES',
|
key: 'UTILITIES',
|
||||||
value: 'Utilities',
|
value: 'Utilities',
|
||||||
@ -31,10 +31,6 @@ describe('categories', () => {
|
|||||||
key: 'OTHER',
|
key: 'OTHER',
|
||||||
value: 'Other',
|
value: 'Other',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
key: 'COLLECTIBLES',
|
|
||||||
value: 'Collectibles',
|
|
||||||
},
|
|
||||||
])
|
])
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
@ -70,6 +70,7 @@
|
|||||||
width: calc(100% - 32px);
|
width: calc(100% - 32px);
|
||||||
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1),
|
box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.1),
|
||||||
0px 2px 6px rgba(136, 122, 249, 0.2);
|
0px 2px 6px rgba(136, 122, 249, 0.2);
|
||||||
|
border: none;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
color: $background;
|
color: $background;
|
||||||
font-family: $font;
|
font-family: $font;
|
||||||
|
@ -18,7 +18,7 @@ class Dapps extends React.Component {
|
|||||||
|
|
||||||
componentDidMount() {
|
componentDidMount() {
|
||||||
this.scanHeaderPositions()
|
this.scanHeaderPositions()
|
||||||
this.boundScroll = debounce(this.handleScroll.bind(this), 200)
|
this.boundScroll = debounce(this.handleScroll.bind(this), 50)
|
||||||
window.addEventListener('scroll', this.boundScroll)
|
window.addEventListener('scroll', this.boundScroll)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,4 +2,5 @@
|
|||||||
|
|
||||||
.list {
|
.list {
|
||||||
margin-top: calculateRem(50);
|
margin-top: calculateRem(50);
|
||||||
|
margin-bottom: calculateRem(20);
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,7 @@ import React from 'react'
|
|||||||
import { DappListModel } from '../../common/utils/models'
|
import { DappListModel } from '../../common/utils/models'
|
||||||
import CategorySelector from '../CategorySelector'
|
import CategorySelector from '../CategorySelector'
|
||||||
import DappList from '../../common/components/DappList'
|
import DappList from '../../common/components/DappList'
|
||||||
|
import styles from './Filtered.module.scss'
|
||||||
|
|
||||||
const Filtered = props => {
|
const Filtered = props => {
|
||||||
const { dapps } = props
|
const { dapps } = props
|
||||||
@ -9,7 +10,9 @@ const Filtered = props => {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<CategorySelector />
|
<CategorySelector />
|
||||||
<DappList dapps={dapps} />
|
<div className={styles.list}>
|
||||||
|
<DappList dapps={dapps} />
|
||||||
|
</div>
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
5
src/modules/Filtered/Filtered.module.scss
Normal file
5
src/modules/Filtered/Filtered.module.scss
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@import '../../common/styles/variables';
|
||||||
|
|
||||||
|
.list {
|
||||||
|
margin-bottom: calculateRem(20);
|
||||||
|
}
|
@ -4,7 +4,7 @@
|
|||||||
font-family: $font;
|
font-family: $font;
|
||||||
font-size: calculateRem(17);
|
font-size: calculateRem(17);
|
||||||
margin-left: calculateRem(15);
|
margin-left: calculateRem(15);
|
||||||
margin-bottom: 0;
|
margin-bottom: calculateRem(10);
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid {
|
.grid {
|
||||||
@ -14,8 +14,11 @@
|
|||||||
grid-template-rows: 1fr 1fr 1fr;
|
grid-template-rows: 1fr 1fr 1fr;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
overflow-y: hidden;
|
overflow-y: hidden;
|
||||||
|
-webkit-overflow-scrolling: touch;
|
||||||
|
|
||||||
@media (min-width: $desktop) {
|
@media (min-width: $desktop) {
|
||||||
grid-auto-columns: calc(30%);
|
grid-auto-flow: row;
|
||||||
|
grid-template-columns: 1fr 1fr 1fr 1fr;
|
||||||
|
overflow-x: hidden;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user