This commit is contained in:
Philippe Torrel
2026-08-07 11:24:07 +02:00
parent 2c47aa98b8
commit 70a9d3ca08
273 changed files with 26737 additions and 38 deletions

View File

@@ -1,4 +1,5 @@
import InputAmount from './components/inputs/InputAmount';
import InputPrice from './components/inputs/InputPrice';
function App(props) {
// const { } = props;
@@ -6,6 +7,10 @@ function App(props) {
return (
<div className="container py-5">
<InputAmount />
<InputPrice />
<InputPrice currency="€" price={10.5} />
<InputPrice currency="$" price={19.5} />
<InputPrice currency="¥" price={21.5} />
</div>
);
}

View File

@@ -0,0 +1,36 @@
import { FaDollarSign, FaEuroSign, FaYenSign } from 'react-icons/fa6';
const InputPrice = (props) => {
const { currency = '$' } = props;
return (
<div className="m-input-price input-price">
<div className="input-group mb-3">
{currency === '$' && (
<span className="input-group-text">
<FaDollarSign />
</span>
)}
<input
type="number"
name="price"
placeholder="0.00"
aria-label="Price"
className="form-control input-price"
step="0.01"
/>
{currency === '€' && (
<span className="input-group-text">
<FaEuroSign />
</span>
)}
{currency === '¥' && (
<span className="input-group-text">
<FaYenSign />
</span>
)}
</div>
</div>
);
};
export default InputPrice;

View File

@@ -5,3 +5,4 @@
// @import 'product-manager';
@import 'button';
@import 'inputAmount';
@import 'inputPrice';

View File

@@ -0,0 +1,6 @@
.m-input-price {
max-width: 200px;
input {
text-align: center;
}
}