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 25 commits into
base: uwds-1641
Choose a base branch
from
Draft

feat: FormField component #372

wants to merge 25 commits into from

Conversation

jordmccord
Copy link
Collaborator

@jordmccord jordmccord commented Jun 18, 2024

Adds FormField and the Form Field child components

[skip-native]

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) Oct 23, 2024 10:16am
web-ui ⬜️ Ignored (Inspect) Visit Preview Oct 23, 2024 10:16am

Copy link

linear bot commented Jun 18, 2024

Copy link

changeset-bot bot commented Jun 18, 2024

🦋 Changeset detected

Latest commit: a4ddc32

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@utilitywarehouse/native-ui Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another 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 08cd80d

@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