mirror of
https://github.com/crypto-pro-web/crypto-pro-js.git
synced 2024-11-24 09:04:59 +03:00
23 lines
736 B
JavaScript
23 lines
736 B
JavaScript
import React from 'react';
|
|
import './App.css';
|
|
import CryptoPro from './components/CryptoPro';
|
|
|
|
function App() {
|
|
return (
|
|
<CryptoPro>{({certificate, setCertificate, signature, setSignature, error, setError}) =>
|
|
<>
|
|
<CryptoPro.CertList onChange={setCertificate} onError={setError}/>
|
|
<CryptoPro.Sign certificate={certificate} onSign={setSignature} onError={setError}>
|
|
Создать подпись
|
|
</CryptoPro.Sign>
|
|
<CryptoPro.CertInfo certificate={certificate} onError={setError}/>
|
|
<textarea value={signature} readOnly cols="100" rows="30"/>
|
|
<pre>{error}</pre>
|
|
<CryptoPro.SystemInfo onError={setError}/>
|
|
</>
|
|
}</CryptoPro>
|
|
);
|
|
}
|
|
|
|
export default App;
|