@@ -1,6 +1,5 @@
11import React from 'react';
2−import { Input, AccessoryIcon, Flex } from 'indigo-react';
3−import cn from 'classnames';
2+import { Input, AccessoryIcon } from 'indigo-react';
43import { useField } from 'react-final-form';
54
65import {
@@ -197,53 +196,3 @@ export function EmailInput({ ...rest }) {
197196 />
198197 );
199198}
200−
201−export const ColorInput = ({
202− name,
203− colors,
204− disabled = false,
205− label,
206− className,
207−}) => {
208− const { input } = useField(name, { subscription: { value: true } });
209−
210− const isWhite = c => c === '#FFFFFF';
211−
212− // disabled = disabled || submitting || submitSucceeded;
213− return (
214− <Flex col className={cn(className, 'flex-wrap mb1')}>
215− <Flex.Item
216− as="label"
217− className={cn('f6 lh-tall', {
218− black: !disabled,
219− gray4: disabled,
220− })}
221− htmlFor={name}>
222− {label}
223− </Flex.Item>
224− <div className="flex flex-wrap">
225− {colors.map(c => (
226− <button
227− type="button"
228− key={c}
229− className={cn('m0 p0 h7 w7 p2 flex flex-center', {
230− 'b b-black': isWhite(c),
231− })}
232− style={{ backgroundColor: c }}
233− onClick={() => input.onChange(c)}>
234− {c === input.value ? (
235− <div
236− className={cn(
237− { 'bg-black': isWhite(c), 'bg-white': !isWhite(c) },
238− 'w2 h2 r-full'
239− )}
240− />
241− ) : (
242− <div />
243− )}
244− </button>
245− ))}
246− </div>
247− </Flex>
248− );
249−};