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

feat: FormField component #372

Draft
wants to merge 17 commits into
base: uwds-1641
Choose a base branch
from
Draft

feat: FormField component #372

wants to merge 17 commits into from

Conversation

jordmccord
Copy link
Collaborator

Adds FormField and the Form Field child components

Copy link

vercel bot commented Jun 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
native-ui ⬜️ Ignored (Inspect) Jul 16, 2024 2:19pm
web-ui ⬜️ Ignored (Inspect) Visit Preview Jul 16, 2024 2:19pm

Copy link

linear bot commented Jun 18, 2024

Copy link

changeset-bot bot commented Jun 18, 2024

⚠️ No Changeset found

Latest commit: 0503e17

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 18, 2024

🖥️ Native UI - Storybook Preview

Visit the Storybook preview URL to see the changes in action.

📱 Appetize Previews

You can view the apps using the link above and choosing the device from the top action bar. Alternatively you can use the direct links below.


Last updated from commit 8526a59

@robphoenix
Copy link
Member

nitpick: I remember this being a PITA in the past when we first added TextField to Web UI; but specifying different border colours results in a pixelated 45 degree cut on the corners rather than the straight cut in the designs.

Native UI Input corner...

image

Web UI TextField corner...

image

To resolve this Web UI uses the :before & :after pseudo classes. Not sure if you can do the same in RN, or if it's even necessary 🤷🏻

@jordmccord
Copy link
Collaborator Author

jordmccord commented Jun 19, 2024

@robphoenix Not quite sure what to google as the issue 😅🤔. Off the top of my head the only way would be to add two elements as pseudo-elements don't exist in RN e.g:

<Input sx={{ position: 'relative' }}>
  <Box
    sx={{
      position: 'absolute',
      bottom: -2,
      left: -2,
      width: 2,
      height: 2,
      backgroundColor: '$grey500',
      zIndex: 1,
    }}
  />
  <InputField placeholder={placeholder} type={type} />
  <Box
    sx={{
      position: 'absolute',
      bottom: -2,
      right: -2,
      width: 2,
      height: 2,
      backgroundColor: '$grey500',
      zIndex: 1,
    }}
  />
</Input>

IMG_7122 copy

@robphoenix
Copy link
Member

Yeah, makes sense, nice solution 🙌🏻

@jordmccord jordmccord marked this pull request as draft June 20, 2024 13:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants