fix Filter hover transform on chrome, and handler after reset
This commit is contained in:
parent
4ff84194fa
commit
897ec4766d
@ -12,10 +12,21 @@ const FilterStyle = styled(FlexRow)`
|
|||||||
box-shadow: ${({theme}) => theme.shadow};
|
box-shadow: ${({theme}) => theme.shadow};
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background-color: ${({theme, active}) => active ? theme.colors.dark : theme.colors.white};
|
background-color: ${({theme, active}) => active ? theme.colors.dark : theme.colors.white};
|
||||||
|
//transition: color, background-color 0.3s ease-in-out;
|
||||||
transition: transform 0.3s ease-in-out;
|
transition: transform 0.3s ease-in-out;
|
||||||
|
z-index: 2;
|
||||||
|
|
||||||
&:hover {
|
&:hover {
|
||||||
|
//background-color: ${({theme}) => theme.colors.dark};
|
||||||
transform: scale(1.1);
|
transform: scale(1.1);
|
||||||
|
|
||||||
|
// p {
|
||||||
|
// color: ${({theme}) => theme.colors.white};
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// span {
|
||||||
|
// background-color: ${({theme}) => theme.colors.white};
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
p {
|
p {
|
||||||
@ -33,6 +44,7 @@ const FilterStyle = styled(FlexRow)`
|
|||||||
|
|
||||||
const Filter = (props) => {
|
const Filter = (props) => {
|
||||||
const onCheckHandler = (e) => {
|
const onCheckHandler = (e) => {
|
||||||
|
console.log('elo');
|
||||||
if (e.target.checked)
|
if (e.target.checked)
|
||||||
props.handler(Number(e.target.value));
|
props.handler(Number(e.target.value));
|
||||||
};
|
};
|
||||||
@ -44,7 +56,8 @@ const Filter = (props) => {
|
|||||||
{props.children}
|
{props.children}
|
||||||
</FilterStyle>
|
</FilterStyle>
|
||||||
<FlexRow display='none' as='input' type='radio' value={props.index}
|
<FlexRow display='none' as='input' type='radio' value={props.index}
|
||||||
id={props.id} name={props.name} onChange={(e) => onCheckHandler(e)}/>
|
id={props.id} name={props.name} checked={props.option === props.index}
|
||||||
|
onChange={(e) => onCheckHandler(e)}/>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -40,7 +40,6 @@ const FiltersMenuStyle = styled(FlexColumn)`
|
|||||||
|
|
||||||
const FiltersMenu = (props) => {
|
const FiltersMenu = (props) => {
|
||||||
const resetHandler = () => {
|
const resetHandler = () => {
|
||||||
console.log('siema');
|
|
||||||
props.sortByHandler(0);
|
props.sortByHandler(0);
|
||||||
props.statusHandler(0);
|
props.statusHandler(0);
|
||||||
props.challengeTypeHandler(0);
|
props.challengeTypeHandler(0);
|
||||||
|
@ -29,7 +29,7 @@ const FilterBy = (props) => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FlexColumn as='fieldset' width='94%' alignmentX='flex-start'>
|
<FlexColumn as='fieldset' width='100%' alignmentX='flex-start' padding='8px'>
|
||||||
<Media query={theme.mobile}>
|
<Media query={theme.mobile}>
|
||||||
<Medium as='legend' textTransform='uppercase' margin='0 0 12px 0'>
|
<Medium as='legend' textTransform='uppercase' margin='0 0 12px 0'>
|
||||||
{props.header}
|
{props.header}
|
||||||
@ -39,9 +39,8 @@ const FilterBy = (props) => {
|
|||||||
<H3 as='legend' textTransform='uppercase' margin='0 0 24px 0'>
|
<H3 as='legend' textTransform='uppercase' margin='0 0 24px 0'>
|
||||||
{props.header}
|
{props.header}
|
||||||
</H3>
|
</H3>
|
||||||
|
|
||||||
</Media>
|
</Media>
|
||||||
<Grid gridTemplateColumns='auto auto' gridGap='12px'>
|
<Grid gridTemplateColumns='auto auto' gridGap='12px' position='relative'>
|
||||||
{renderFilterOptions()}
|
{renderFilterOptions()}
|
||||||
</Grid>
|
</Grid>
|
||||||
</FlexColumn>
|
</FlexColumn>
|
||||||
|
Loading…
Reference in New Issue
Block a user