Skip to content
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

Display red border around styled inputs when there are errors #9942

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ const StyledInput = styled.input<{
}>`
${TEXT_INPUT_STYLE}

${({ hasItem, theme }) =>
${({ hasError, hasItem, theme }) =>
hasItem &&
css`
background-color: ${theme.background.transparent.lighter};
border-radius: 4px;
border: 1px solid ${theme.border.color.medium};
border: 1px solid ${hasError ? theme.border.color.danger : theme.border.color.medium};
`}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logic: Error styling only applies when hasItem is true. Consider if error state should be visible regardless of hasItem status.


box-sizing: border-box;
Expand Down
Loading