This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
const InputPrice = (props) => {
|
||||
const { currency = '$' } = props;
|
||||
|
||||
const InputGroupText = () => {
|
||||
return <div className="input-group-text">{currency}</div>;
|
||||
};
|
||||
return (
|
||||
<div className="m-input-price input-price">
|
||||
<div className="input-group">
|
||||
{currency === '$' && InputGroupText()}
|
||||
<input type="text" placeholder="0.00" name="price" className="form-control input-price" />
|
||||
{(currency === '€' || currency === '¥') && InputGroupText()}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default InputPrice;
|
||||
Reference in New Issue
Block a user