Refactor HashGeneratorComponent to use new Input component and reorder elements

This commit is contained in:
Patrick Alvin Alcala 2025-06-04 15:50:39 +08:00
parent 8324596b77
commit f830f5b5e8

View file

@ -69,17 +69,11 @@ export default () => {
} }
return ( return (
<>
<section class="section"> <section class="section">
<TextField class="input" value={plainText()} onChange={setPlainText}>
<TextField.Label class="input__label">Plain Text:</TextField.Label>
<TextField.TextArea class="input__textarea" />
</TextField>
<Input label="Plain Text" value={plainText()} onChange={setPlainText} isTextField></Input> <Input label="Plain Text" value={plainText()} onChange={setPlainText} isTextField></Input>
<div class="output"> <div class="output">
{/* <span class="output__title">Results:</span> */}
<MiniCard text="MD5" content={md5()} onClick={() => copyToClipboard(md5(), 'MD5')} /> <MiniCard text="MD5" content={md5()} onClick={() => copyToClipboard(md5(), 'MD5')} />
<Alert for="MD5" trigger={copiedText() === 'MD5'} /> <Alert for="MD5" trigger={copiedText() === 'MD5'} />
@ -131,5 +125,6 @@ export default () => {
<Alert for="HMAC SHA3" trigger={copiedText() === 'HMAC SHA3'} /> <Alert for="HMAC SHA3" trigger={copiedText() === 'HMAC SHA3'} />
</div> </div>
</section> </section>
</>
) )
} }