Skip to content

Commit

Permalink
Merge pull request #36 from ChetanKarwa/editprofile/fix-padding-for-i…
Browse files Browse the repository at this point in the history
…nput-with-prepend

Fix Edit Profile - Fix padding for input with prepend
  • Loading branch information
elraphty authored Jan 28, 2024
2 parents c5a09c6 + 4b47847 commit cc1982e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/form/inputs/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export default function TextInput({
const [active, setActive] = useState<boolean>(false);
const color = colors['light'];

const padStyle = prepend ? { paddingLeft: 0 } : {};
const padStyle = prepend && active ? { paddingLeft: 0 } : {};
return (
<OuterContainer color={color}>
<FieldEnv
Expand Down
5 changes: 5 additions & 0 deletions src/people/widgetViews/__tests__/EditOrgModal.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,11 @@ describe('EditOrgModal Component', () => {
expect(screen.getAllByText(/Github repo/i)).toHaveLength(2);
});

test('Padding for the Github repo text field should not be 0', () => {
render(<EditOrgModal {...props} />);
expect(screen.getByLabelText(/Github repo/i)).not.toHaveStyle('padding: 0');
});

test('displays the Description box', () => {
render(<EditOrgModal {...props} />);
expect(screen.getAllByText(/Description/i)).toHaveLength(2);
Expand Down

0 comments on commit cc1982e

Please sign in to comment.