-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0b8496b
commit ae6ef49
Showing
2 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
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,47 @@ | ||
$NEUTRAL: #e6e9e9; | ||
$SUCCESS: #4bb4b3; | ||
$ERROR: #ec3f3f; | ||
|
||
.deriv-password { | ||
width: fit-content; | ||
position: relative; | ||
|
||
&-meter { | ||
z-index: -1; | ||
bottom: 1px; | ||
border-radius: 0px 0px 4px 4px; | ||
position: absolute; | ||
width: 100%; | ||
height: 4px; | ||
background-color: $NEUTRAL; | ||
} | ||
} | ||
|
||
.deriv-password-meter--bar { | ||
height: 100%; | ||
border-radius: 0px 0px 4px 4px; | ||
|
||
&__weak { | ||
background-color: $ERROR; | ||
width: 25%; | ||
border-radius: 0px 0px 0px 4px; | ||
} | ||
|
||
&__moderate { | ||
background-color: $ERROR; | ||
width: 50%; | ||
border-radius: 0px 0px 0px 4px; | ||
} | ||
|
||
&__strong { | ||
background-color: $SUCCESS; | ||
width: 50%; | ||
border-radius: 0px 0px 0px 4px; | ||
} | ||
|
||
&__complete { | ||
background-color: $SUCCESS; | ||
width: 100%; | ||
border-radius: 0px 0px 4px 4px; | ||
} | ||
} |
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,16 @@ | ||
import React, { ComponentProps } from "react"; | ||
import { Input } from "../Input"; | ||
import "./PasswordInput.scss"; | ||
|
||
interface PasswordInputProps extends ComponentProps<typeof Input> {} | ||
|
||
export const PasswordInput = ({ ...props }: PasswordInputProps) => { | ||
return ( | ||
<div className="deriv-password"> | ||
<Input type="password" {...props} /> | ||
<div className="deriv-password-meter"> | ||
<div className="deriv-password-meter--bar"></div> | ||
</div> | ||
</div> | ||
); | ||
}; |