« Max reacjsex » : différence entre les versions

Aucun résumé des modifications
Aucun résumé des modifications
Ligne 36 : Ligne 36 :


<syntaxhighlight lang="js" line copy>// components/common/ZoneNumerique.jsx
<syntaxhighlight lang="js" line copy>// components/common/ZoneNumerique.jsx
export const ZoneNumerique = ({ value, onChange, disabled }) =&gt; {
export const ZoneNumerique = ({ value, onChange, disabled }) => {
   return (
   return (
     &lt;input  
     <input  
       type=&quot;number&quot;
       type="number"
       value={value}  
       value={value}  
       onChange={(e) =&gt; onChange(e.target.value)}  
       onChange={(e) => onChange(e.target.value)}  
       disabled={disabled}
       disabled={disabled}
     /&gt;
     />
   );
   );
};
};</syntaxhighlight>
};</syntaxhighlight>
<syntaxhighlight lang="jsx" line copy>// components/common/Bouton.jsx
<syntaxhighlight lang="jsx" line copy>// components/common/Bouton.jsx
export const Bouton = ({ label, onClick, disabled }) =&gt; {
export const Bouton = ({ label, onClick, disabled }) => {
   return (
   return (
     &lt;button onClick={onClick} disabled={disabled}&gt;
     <button onClick={onClick} disabled={disabled}>
       {label}
       {label}
     &lt;/button&gt;
     </button>
   );
   );
};
};</syntaxhighlight>
};</syntaxhighlight>