1
0
mirror of https://github.com/storybookjs/storybook.git synced 2025-03-29 05:04:31 +08:00
2018-04-21 01:47:30 +03:00

23 lines
464 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
function Input({ id, value, type, placeholder }) {
return <input id={id} value={value} placeholder={placeholder} type={type} />;
}
Input.propTypes = {
type: PropTypes.oneOf(['text', 'password']),
id: PropTypes.string,
value: PropTypes.string,
placeholder: PropTypes.string,
};
Input.defaultProps = {
type: null,
id: null,
value: null,
placeholder: null,
};
export default Input;