This commit is contained in:
Philippe Torrel
2026-10-26 10:10:08 +01:00
parent 778d1f2929
commit f8fc579c6f
12 changed files with 6751 additions and 16 deletions
@@ -1,11 +1,17 @@
import InputAmount from './components/inputs/InputAmount';
import InputPrice from './components/inputs/InputPrice';
function App(props) {
// const { } = props;
return (
<div className="container py-5">
<InputAmount />
<InputPrice />
<br />
<InputPrice currency="$" />
<br />
<InputPrice currency="€" />
<br />
<InputPrice currency="¥" />
</div>
);
}
@@ -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;