-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #189 from mintlayer/dev
* feat: add nested navigation and wallets menu * feat: add Textarea basic component, replace textarea with new component on Restore wallet * feat: add new array helpers * feat: add Sign and Verify message components * feat: add Message page * feat: update MIntlayer lib with new messages functions update Textarea * chore: remove console.log * feat: add message verification * feat: update wasm library (#187) * feat: replace signing/verify function with verifyChallenge and signChallenge * feat: remove steps from signin * feat: remove steps from verify --------- Co-authored-by: Sergey <[email protected]>
- Loading branch information
Showing
28 changed files
with
2,028 additions
and
298 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions
7
...sed/RestoreSeedField/RestoreSeedField.css → src/components/basic/Textarea/Textarea.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,13 @@ | ||
.seed-textarea { | ||
.textarea { | ||
width: 100%; | ||
padding: 15px; | ||
resize: none; | ||
} | ||
|
||
.seed-textarea.seed-invalid { | ||
.textaria-invalid { | ||
border-bottom: 2px solid rgb(var(--color-red)); | ||
} | ||
|
||
.seed-textarea.seed-valid { | ||
.textaria-valid { | ||
border-bottom: 2px solid rgb(var(--color-green)); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import React, { useEffect, useState } from 'react' | ||
import './Textarea.css' | ||
|
||
const Textarea = ({ | ||
value, | ||
onChange, | ||
extraClasses, | ||
id, | ||
size, | ||
validity = true, | ||
disabled, | ||
}) => { | ||
const [textareaVakue, setTextareaValue] = useState(value ? value : '') | ||
|
||
useEffect(() => { | ||
setTextareaValue(value) | ||
}, [value]) | ||
|
||
const getExtraClasses = () => { | ||
if (value && validity) { | ||
return 'textaria-valid' | ||
} else if (value && !validity) { | ||
return 'textaria-invalid' | ||
} else { | ||
return '' | ||
} | ||
} | ||
const onChangeHandler = ({ target }) => { | ||
onChange && onChange({ target }) | ||
setTextareaValue(target.value) | ||
getExtraClasses() | ||
} | ||
|
||
return ( | ||
<textarea | ||
data-testid={id} | ||
value={textareaVakue} | ||
onChange={onChangeHandler} | ||
className={`textarea ${getExtraClasses()} ${extraClasses}`} | ||
name={id} | ||
id={id} | ||
cols={size.cols} | ||
rows={size.rows} | ||
readOnly={disabled} | ||
/> | ||
) | ||
} | ||
|
||
export default Textarea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.