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

docs: MDS-866 Chip Component Docs #32

Merged
merged 11 commits into from
Dec 27, 2023
Merged

docs: MDS-866 Chip Component Docs #32

merged 11 commits into from
Dec 27, 2023

Conversation

salvatorecriscioneweb
Copy link
Contributor

@salvatorecriscioneweb salvatorecriscioneweb commented Dec 19, 2023

  • Removed some examples because redundant and/or confusing
  • Rewrote some titles
  • Added descriptions to most of the examples

@salvatorecriscioneweb salvatorecriscioneweb marked this pull request as ready for review December 20, 2023 15:00
import { useCallback, useState } from "react";
import { Chip } from "@heathmont/moon-core-tw";

const WithOnClick = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The previous example was printing a console.log statement, which lacked visual appeal. The question is Chip component is suitable for acting as a button? Any insights on this matter would be appreciated

Copy link
Contributor

Choose a reason for hiding this comment

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

@salvatorecriscioneweb, this is a good question. We definitely need to describe the difference between a chip and a button. @dkireev, could you please assist with a good description in a separate PR?

Regarding acting as a button, let's leave it for now as it is

Copy link
Contributor

Choose a reason for hiding this comment

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

Basically, the main difference is that a chip supports an 'Active' state, indicating that the appropriate field was selected. However, we need to add a concrete and straightforward description.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, added the alert for now to enable end-to-end testing on the click, as using console.log isn't very effective for tracking in Playwright


const sports = ["basket", "football", "cricket"];

const IsActive = () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@karl-kallavus also this example was rewrote and created brand new for better clarification. Let me know if it's ok

docs/app/client/chip/examples/Active.tsx Show resolved Hide resolved
import { useCallback, useState } from "react";
import { Chip } from "@heathmont/moon-core-tw";

const WithOnClick = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

@salvatorecriscioneweb, this is a good question. We definitely need to describe the difference between a chip and a button. @dkireev, could you please assist with a good description in a separate PR?

Regarding acting as a button, let's leave it for now as it is

import { useCallback, useState } from "react";
import { Chip } from "@heathmont/moon-core-tw";

const WithOnClick = () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Basically, the main difference is that a chip supports an 'Active' state, indicating that the appropriate field was selected. However, we need to add a concrete and straightforward description.

docs/e2e/avatar.spec.ts Show resolved Hide resolved
@salvatorecriscioneweb salvatorecriscioneweb merged commit b0a61cb into main Dec 27, 2023
4 checks passed
@salvatorecriscioneweb salvatorecriscioneweb deleted the MDS-866 branch December 27, 2023 14:02
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.

2 participants