import React, { Component } from 'react'; import { Link } from 'react-router-dom' import { clamp, percent } from '../util' export const Swatch = ({ color }) => (
) export const Dot = ({ color }) => ( ) export const Columns = ({ count, margin, width, object, children, className }) => { if (!object || !object.length) object = children if (!object || !object.length) return null margin = margin || 380 width = width || 250 count = count || Math.floor((window.innerWidth - margin) / width) let columns = [] let len = object.length let j = 0 for (let i = 0; i < count; i++) { let column_len = len * (i + 1) / count let column = [] for (; j < column_len; j++) { column.push(