-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
Travis automatic deployment: |
src/inputs/TextField/index.tsx
Outdated
<InputAdornment position="start">{startAdornment}</InputAdornment> | ||
) : null, | ||
endAdornment: endAdornment ? ( | ||
<InputAdornment position="start">{endAdornment}</InputAdornment> |
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.
shouldn't this be position="end"
?
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.
no really, have you watch it on storybook? that set the position inside the Adornment, not at the start or end of the input.
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.
src/inputs/TextField/index.tsx
Outdated
meta?: any; | ||
input?: any; // added for compatibility with react-final-form |
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.
Is it possible to make these typed?
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.
done
src/inputs/TextField/index.tsx
Outdated
<TextFieldMui {...props} /> | ||
))<Props>` | ||
const CustomTextField = styled( | ||
({ input, startAdornment, endAdornment, ...props }) => ( |
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.
Are these typed?
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.
I did some changes, now it only receives ...props
but it's a little tricky to type it. It Should be typed to TextFieldProps
but TS is complaining about some overloads props and the message is not friendly at all.
I think it's having problems with InputProps args, but not I'm not sure, could you take a look, please?
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.
this is very hard to type, please don't use spread operators. Also, keep in mind that most of our components are just wrappers over Material UI components and they have their prop types exported (for example there is TextFieldProps) and we may take use of it
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.
Agreed, but in this particular case, we need to propagate the input props. How could we do it without using spread?
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.
I'm not saying anything about this particular case but in general
Travis automatic deployment: |
Travis automatic deployment: |
Travis automatic deployment: |
Travis automatic deployment: |
Travis automatic deployment: |
Travis automatic deployment: |
closes #21.