-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add TextInput (and TextInput.Number) #67
Conversation
src/components/Form/Input.js
Outdated
} | ||
&:read-only { | ||
color: transparent; | ||
text-shadow: 0 0 0 ${theme.textSecondary}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly for Firefox; Firefox does this weird thing where readonly
inputs still show a flashing cursor.
An interesting fix for this is to make the text color transparent, and then use a text-shadow to display text given through value
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice fix :-)
Do you if this is interpreted correctly by screen readers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a good question, a quick investigation doesn't bring up anything too conclusive but a test using voice over on OSX does read the read only value.
Shall we name this component For example, I think our implementation of
I agree, having components groups will make things clearer, great idea! About I checked what others are doing: iOS uses the name “Controls” to group some of its interactive components, and Android uses the name “Input Controls”. What would you think of using a similar name for this group, instead of Form? |
👍. I'll make it so
Not sure I like |
👍
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
Adds a basic, styled
<input />
box.I've added the README as
src/Form/Input.md
, since I can seesrc/Form
containing multiple components in the future (all the other input types, etc). In general, it might be interesting to have folders undersrc/
be groups holding actual components, with each component's documentation living as<component name>.md
.Fixes #49.