-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feat] Create a textinput component #39
base: main
Are you sure you want to change the base?
Conversation
ut, complexity check, and toggle password visibility features
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking great so far!! tysm rachael! 🤩
some comments
- make sure u import colors from figma into the styles/colors.ts folder!
- import the show/hide icon from figma and use absolute positioning to place it on top of the input (see my comment)
- we should merge in auth context and confirm password asap and rebase before merging this!
font-size: 1rem; | ||
font-weight: 500; | ||
margin-bottom: 0.5rem; | ||
color: darkgreen; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure you use the custom colors from figma. you can find this by going on dev mode and getting the hex code. Then, add the color to the styles/colors.ts
folder and import it into this file and access the color here using
color: ${COLORS.darkGreen}
transition: border-color 0.3s ease; | ||
|
||
&:focus { | ||
border-color: green; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
flagging the color comment!
{type === 'password' && toggleVisibility && ( | ||
<button | ||
type="button" | ||
onClick={toggleVisibility} | ||
style={{ | ||
marginBottom: '10px', | ||
}} | ||
> | ||
{isVisible ? 'Hide' : 'Show'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we want to import the Show and Hide icons from figma and add it to the project. in order to be consistent with the designs, this should also appear inside the Input bar.
To achieve this, chatGPT suggested this:
- Wrap the input and the button in a container.
- Use absolute positioning on the button to place it inside the input field on the right side.
you'll prob need to make some edits like this
const InputWrapper = styled.div`
position: relative;
width: 100%;
`;
const ShowHideButton = styled.button`
position: absolute;
right: 10px; // or whatever it is
top: 50%; // this line and...
transform: translateY(-50%); // this line help center the Button within input box
cursor: pointer;
`;
What's new in this PR 🧑🌾
Description
TextInput
component that highlights the border of the active input field in green.TextInput
component to style the input fields on the login and sign-up pages.Screenshots
Styled Log In and Sign Up pages
Selected Input
How to review
components/TextInput
andcomponents/styles
files/login
and/signup
pagesNext steps
Relevant links
Online sources
Related PRs
CC: @ccatherinetan