-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: transform state to corresponding css selector and data-attr #1979
Conversation
🦋 Changeset detectedLatest commit: c681b36 The changes in this PR will be included in the next version bump. This PR includes changesets to release 8 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
…ransform-pseudos
* (e.g. `[data-hover]` and `[data-focus]`). | ||
*/ | ||
export const useStateProps = ( | ||
states: { [key in ComponentState]?: boolean } = {} |
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.
coverage has pointed out that there is no test when {} is specified without states. So the default. Then I asked myself, should I just add the test or check in the hook if states are specified and if not show an error message? Or why should you use the hook without specifying states? What do you mean?
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 it's fine to pass an empty object. Even though this night never happen in the real world 😄
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.
But then fix coverage with a test for this, right? 😊
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.
hm.. still saying line 27 is not tested. Whats the problem?
…rigold into transform-pseudos
* main: (32 commits) refa: remove unsued elements from <Aspect> (#2000) refa: divider restructure (#1999) feat(comp): headline component (#1998) feat: New component <Content> (#1997) fix docu links and card (#1995) refa: card styles structur (#1994) feat: Update styles for input and texarea with hovers (#1993) refa: Link styles (#1992) refa: textarea restructure styles (#1991) refa: Input Component restyled and restructure (#1990) refa: Field Component restructure (#1988) docs: delete default variant in docs (#1986) fix: export useStateHook from system (#1985) refa: Image new styling solution (#1984) fix(docs): remove old Field component and replace with Textfield (#1983) feat: transform state to corresponding css selector and data-attr (#1979) refa: Badge uses new styling solution (#1982) refa: remove <ActionGroup> chore(deps): update dependency @types/react to v17.0.44 (#1974) fix(deps): update dependency @babel/core to v7.17.9 (#1975) ...
No description provided.