Skip to content
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/UI checkbox component #2191

Merged
merged 6 commits into from
May 28, 2024
Merged

Feat/UI checkbox component #2191

merged 6 commits into from
May 28, 2024

Conversation

r-mulder
Copy link
Contributor

This PR will add the new checkbox component to the library.

The checkbox is fully based on react aria with our custom styles.

Copy link

vercel bot commented May 24, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
alpha-docs ❌ Failed (Inspect) 💬 Add feedback May 28, 2024 0:02am
proof-of-us ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 0:02am
react-ui ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 0:02am
tools ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 28, 2024 0:02am
1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
marmalade-marketplace ⬜️ Ignored (Inspect) Visit Preview May 28, 2024 0:02am

Copy link

changeset-bot bot commented May 24, 2024

🦋 Changeset detected

Latest commit: 2387874

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@kadena/react-ui Patch
@kadena/dev-wallet Patch
@kadena/explorer Patch
@kadena/graph-client Patch
@kadena/proof-of-us Patch
@kadena/dev-wallet-desktop Patch

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

"@kadena/react-ui": patch
---

feat: new checkbox component added to the component library
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would recommend reading the CONTRIBUTING.md file in the root of kadena.js

Here's a snippet about changesets:


To keep everything clear for ourselves and our end users, we have a "changelog
etiquette". Only include changes that affect the consumer of your
package/app/product. It's not a commit log. Write descriptions that are
understandable from the consumers' perspective:

- Start descriptions with action verbs like "Add", "Remove", "Deprecate", "Fix",
  "Improve", "Update".
- Avoid the term "bug", use "issue" instead.
- Add GitHub issue numbers when fixing those.
- When referring to public API changes, use backticks and parentheses for code
  like function names and classes (e.g. `createClient()`,
  `new TransactionBuilder()`, `hash`).
- Upgrades should be documented with old and new version numbers.
- Avoid trailing periods (unless in a description below the commit title).

Examples:

- Deprecate the `doSomething()` API function.
- Use `doSomethingBetter()` instead.
- Fix issue where `ExampleWidget` API did not handle dates correctly (fix #81)
- Improve the diagnostic logging when running in advanced mode.
- Upgrade from `react@15` to `react@16-beta` release of the flexible panels
  feature

(Credits: [rushjs.io/pages/best_practices/change_logs][8])

If you don't see a need for authoring changelogs for your package (e.g. a PoC or
packages without consumers), add it to [.changeset/config.json#ignore][9].

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear, I'll edit this message. Thanks!

Comment on lines +10 to +12
alignItems: 'flex-start',
lineHeight: token('size.n4'),
cursor: 'pointer',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can alignItems and cursor be in atoms?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just discussed to remove atoms from the react-ui library. So this will change but I'll be moving the styles out the atoms function.

},
};

export const _ReadOnlyChecked: CheckboxStoryType = {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

curious: what's the reason for the underscore?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One of the very few things I copy pasted.. I'll see if I can remove them

@@ -68,7 +68,6 @@ type LinkStory = StoryObj<ILinkProps>;
export const _Button: LinkStory = {
args: {
children: 'Hello world',
variant: 'primary',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i believe the variant arg type defined in meta is incorrect. I think there should be color and style variant?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link and Button have the same API, except for the default value of the variant prop. So by removing this prop you get the "transparent" variant.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ahh I see the variant includes styles and colors. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants