Skip to content
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.

Feature - Input Component [Dev] #52

Open
2 tasks done
omarefg opened this issue Nov 14, 2021 · 0 comments Β· May be fixed by #78
Open
2 tasks done

Feature - Input Component [Dev] #52

omarefg opened this issue Nov 14, 2021 · 0 comments Β· May be fixed by #78
Assignees
Labels
carry-over-4 task that started in sprint 4 but it's not finished. carry-over-5 task that started in sprint 5 but it's not finished. components A components feature feature New feature or request weight:3 something that required understanding
Milestone

Comments

@omarefg
Copy link
Contributor

omarefg commented Nov 14, 2021

Checklist βœ…

  • The issue is present in the latest release.
  • I have searched the issues of this repository and believe that this is not a duplicate.

Summary πŸ’‘

The Input component will be used like this:

import { useState } from 'react';
import { Input } from '@platzily-ui/components';
// import Input from '@platzily-ui/components/Input'; Can by called like this either.


export default function MyForm() {
    const [state, setState] = useState({
      name: ''    
    })

    const handleInputChange = (event) => setState({ name: event.target.value })

    return (
      <form>
        <Input
          value={state.name}
          onChange={handleInputChange}
        />
      </form>
    )
}

Requirements 🌈

The Input component will be used by the user to pass information in the UI.

The user will import the Input component and it will have to receive all available props for an input HTML element.

As the user could need to give the Input a ref, it must be done using React.forwardRef API.

The Input should have this states:

  • Disabled
  • Focus
  • Active
  • Hover

Motivation πŸ”¦

An Input is a basic component in any UI, so it make sense for Platzily-UI to have its own implementation of an Input element.

@omarefg omarefg added the feature New feature or request label Nov 14, 2021
@omarefg omarefg added the components A components feature label Nov 14, 2021
@omarefg omarefg added this to the Sprint 4 - UI milestone Nov 14, 2021
@omarefg omarefg added the carry-over-4 task that started in sprint 4 but it's not finished. label Nov 16, 2021
@omarefg omarefg modified the milestones: Sprint 4 - UI, Sprint 5 - UI Nov 16, 2021
@kevfarid kevfarid linked a pull request Nov 18, 2021 that will close this issue
5 tasks
@danielvaldivv danielvaldivv added documentation Improvements or additions to documentation weight:3 something that required understanding and removed documentation Improvements or additions to documentation labels Nov 23, 2021
@edanfesi edanfesi modified the milestones: Sprint 5 - UI, Sprint 6 - UI Dec 1, 2021
@edanfesi edanfesi added the carry-over-5 task that started in sprint 5 but it's not finished. label Dec 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
carry-over-4 task that started in sprint 4 but it's not finished. carry-over-5 task that started in sprint 5 but it's not finished. components A components feature feature New feature or request weight:3 something that required understanding
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

3 participants