Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- export function visBrands() {
- clearTimeout(closeBrandsTimer);
- return dispatch => {
- visBrandsTimer = setTimeout(()=>{
- dispatch({
- type: VIS_BRANDS,
- })}, openDelay
- );
- }
- }
- export function closeBrands() {
- clearTimeout(visBrandsTimer);
- return dispatch => {
- closeBrandsTimer = setTimeout(()=>{
- dispatch({
- type: CLOSE_BRANDS,
- })}, closeDelay
- );
- }
- }
- import React from 'react';
- import styles from './Brands.css';
- import {brandsList} from '../../../data/brandsList';
- const Brands = ({visBrands, closeBrands}) => {
- const brands = brandsList.map((brand) => {
- return (<div key={brand.id} className={styles.list}>
- {brand.title}
- </div>)
- });
- return(
- <div onMouseEnter={visBrands} onMouseLeave={closeBrands}
- className={styles.wrapBrands}>
- <div className={styles.Brands}>
- {brands}
- <div className={styles.allBrand}>Показать все бренды</div>
- </div>
- </div>
- )
- };
- export default Brands;
Add Comment
Please, Sign In to add comment