import React, { useState, forwardRef } from 'react';
import classNames from 'classnames';
import PropTypes from 'prop-types';
import theme from '../../styles/defaultTheme';
import { hexa } from '../../styles/global';
const InputContainer = ({ children, prefix, className }) => (
{prefix && {prefix}}
{children}
);
InputContainer.propTypes = {
children: PropTypes.node,
className: PropTypes.string,
prefix: PropTypes.string,
};
export const TextInput = forwardRef(
({ onChange, prefix, variant, ...rest }, ref) => {
const cx = classNames('input-container', variant, { prefix });
return (
);
}
);
TextInput.propTypes = {
onChange: PropTypes.func,
prefix: PropTypes.string,
variant: PropTypes.string,
};
export const BooleanInput = ({
value = false,
onChange = () => null,
disabled = false,
...rest
}) => {
const [checked, setChecked] = useState(value);
return (
// eslint-disable-next-line
);
};
BooleanInput.propTypes = {
onChange: PropTypes.func,
disabled: PropTypes.bool,
value: PropTypes.bool,
label: PropTypes.string,
};
export const SelectInput = ({
onChange,
value,
variant,
children,
...rest
}) => {
const cx = classNames('input-container', variant);
return (
);
};
SelectInput.propTypes = {
onChange: PropTypes.func,
children: PropTypes.node,
value: PropTypes.any,
variant: PropTypes.string,
label: PropTypes.string,
};
export default TextInput;