Skip to content

Creating Custom FormControl Component #45459

Closed

Description

@ahmaxed

FormControl

Props:

  • onChange: func
  • value?: string
  • componentClass?: string
  • placeholder?: string
  • name?: string
  • required?: string
  • rows?: 4
  • type?: 'text' | 'email | 'url'

Variations:

  • FormControl
  • FormControl.static
  • FormControl.Feedback

Activity

  1. added
    scope: curriculum
    status: waiting triage
    on Mar 18, 2022
  2. self-assigned this
    on Mar 18, 2022
  3. removed
    status: waiting triage
    on Mar 21, 2022
  4. changed the title [-]Creating Custom Form Related Components[/-] [+]Creating Custom FormControl Component[/+] on Mar 25, 2022
  5. Sboonny commented on Jul 2, 2022

    @Sboonny
    Member

    Form control for chapter:

    Need to alter the props to account for chapter needs, here is the link to the chakira component

    https://github.com/chakra-ui/chakra-ui/tree/main/packages/form-control

  6. ahmaxed commented on Jul 4, 2022

    @ahmaxed
    MemberAuthor

    Which prop is being used in the chapter that we are not passing in the component library?
    Since chapter views are limited, it might be easier to create the components with learn specifications and use those props to control the component. does that make senes?

  7. Sboonny commented on Jul 4, 2022

    @Sboonny
    Member

    Instead of checking the chaikra library and comparing it with the current component, I am better off checking chapter itself for prop it's using.

    for example, in this file https://github.com/freeCodeCamp/chapter/blob/main/client/src/components/Form/Fields.tsx
    we are using key and isRequired, so I note these down and check if these 2 props are different from the props we are using.

    depend on how different they are, I may do from the follow:

    • Add new value to existing prop.
    • Add new prop to the component.
    • Do nothing.
  8. ahmaxed commented on Jul 5, 2022

    @ahmaxed
    MemberAuthor

    Here is what I propose we do. We could continue building the components with the learn spec and ship them. For the second sprint, we collect the Chapter requirements and update the components accordingly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

scope: curriculum

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions