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

[core] feat: SwitchCard component #6250

Merged
merged 26 commits into from
Oct 5, 2023
Merged

Conversation

CPerinet
Copy link
Contributor

@CPerinet CPerinet commented Jun 27, 2023

Based on #6246 edit: that PR has merged

Screenshot 2023-06-27 at 12 57 28 PM

@adidahiya
Copy link
Contributor

adidahiya commented Jun 27, 2023

I fixed the double click issue by using the switch onChange handler instead of a new onClick on the containing Card. This required moving the card padding down to the label element.

2023-06-27 13 26 23

@CPerinet CPerinet requested a review from adidahiya June 27, 2023 20:51
@adidahiya
Copy link
Contributor

I fixed the issue where the right side of the card was non-interactive:

2023-07-05 16 03 10

@adidahiya adidahiya self-assigned this Sep 5, 2023
@adidahiya
Copy link
Contributor

@CPerinet
Copy link
Contributor Author

CPerinet commented Oct 5, 2023

  • The padding on card list cards does not get overriden correctly.
  • Do we want to also add radio and checkbox cards?

@adidahiya
Copy link
Contributor

The padding on card list cards does not get overriden correctly.

Ah, I see the issue. I'll push a fix:

2023-10-05 12 18 05

Do we want to also add radio and checkbox cards?

Yes, in a separate PR

import { Example, ExampleProps, handleBooleanChange } from "@blueprintjs/docs-theme";

interface SwitchCardExampleState {
// TODO: add compact option
Copy link
Contributor

Choose a reason for hiding this comment

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

@CPerinet we can add this option to this example once we implement <Card compact={true} /> in a separate PR. The padding style variable has already been added in _card-variables.scss 👍

@adidahiya adidahiya marked this pull request as ready for review October 5, 2023 17:48
@adidahiya adidahiya changed the title Switch / Checkbox / Radio Card(s) [core] feat: SwitchCard component Oct 5, 2023
@adidahiya
Copy link
Contributor

I added an example showing composition with CardList:

image

@adidahiya adidahiya merged commit 4603072 into palantir:develop Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants