Skip to content

Latest commit

 

History

History
26 lines (21 loc) · 571 Bytes

Colorable.md

File metadata and controls

26 lines (21 loc) · 571 Bytes

Colorable

Render prop component for the colorable library.

import React from 'react'
import { Colorable } from '@compositor/kit'
import Button from '../src/Button'

export default props => (
  <Colorable
    colors={['black', 'white', '#07c', 'tomato']}
    children={combos => combos.map(combo =>
      <div
        key={combo.hex}
        children={combo.combinations.map(c =>
          <Button key={c.hex} bg={c.hex} color={combo.hex} m={3}>Beep</Button>
        )}
      />
    )}
  />
)