-
Notifications
You must be signed in to change notification settings - Fork 321
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
chore(BaseInput): reusable, internal Input component #2053
Conversation
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.
Super cool! Do you think it's worth adding stories (without doc page) so it will be chromaticated and hidden from SB?
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'd call it just 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.
Hmm let's discuss it
I'm leaving it open for having an Input component which would be exported from Vibe
05dfdc2
to
584dfa2
Compare
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.
Very cool!
} | ||
} | ||
|
||
&:has(.input[aria-invalid="true"]) { |
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.
Didn't we say we can't use has
for now?
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.
added support for both browsers that do and do not support has
describe("with declared props", () => { | ||
it("should apply the size class", () => { | ||
const { getByLabelText } = renderBaseInput({ size: "large" }); | ||
expect(getByLabelText("base-input").parentNode).toHaveClass("large"); |
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 think you can use container
or something similar to get the outer element
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.
container gives where the BaseInput is rendered, so I need to query the there the firstChild
so it is pretty much the same..
I'll leave it the way it is I think
packages/core/src/components/BaseInput/__tests__/BaseInput.jest.tsx
Outdated
Show resolved
Hide resolved
ec1ceda
to
82d9597
Compare
https://monday.monday.com/boards/3532714909/pulses/6437205266