This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Group an array of object by a specified key | |
* @param {array} items Array of objects | |
* @param {string} key Key to use for grouping | |
* @returns {object} | |
*/ | |
const groupBy = (items, key) => { | |
return items.reduce( | |
(result, item) => ({ | |
...result, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { forwardRef } from 'react' | |
import styled from 'styled-components' | |
import css, { get } from '@styled-system/css' | |
import { | |
system, | |
compose, | |
space, | |
color, | |
typography, | |
layout, |
OlderNewer