AdrianMachado / KaiUI

React component library for KaiOS apps
MIT License
188 stars 39 forks source link

Added TextInput component #5

Closed DanielBrierton closed 5 years ago

DanielBrierton commented 5 years ago

Added a TextInput component.

Allows binding of an onChange function to the input so you can immediately update state, as shown in the example.

Only supports single line for now.

DanielBrierton commented 5 years ago

Right, I think that's everything addressed. I guess a couple things up in the air still around handling of input in a tab, but feels pretty solid to me now.

Phidelux commented 5 years ago

Looks good to me, but we should agree on a coding style. You use a somehow cleaner way to split up properties of a component. And you enclose single parameters to an arrow function in parentheses, which we omitted so far. However, I like the way you forwarded the HTML specific properties from the component to the input element. Great work. Thanks.