-
Notifications
You must be signed in to change notification settings - Fork 0
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(Card): adding support for darker mode and noBorder options #576
feat(Card): adding support for darker mode and noBorder options #576
Conversation
WalkthroughThis update introduces a new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Card
participant Storybook
participant UI
User->>Storybook: Requests Card component with `noBorder`
Storybook->>UI: Instantiates Card with `noBorder` prop
UI->>Card: Render with `noBorder=false` (default)
User->>Storybook: Requests Card component with "darker" mode
Storybook->>UI: Instantiates Card with `mode="darker"`
UI->>Card: Render with darker style applied
TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
Bundle Size (components)
Overall bundle size: 82.65 KB (+30 B +0.04%) Bundle Size (form components)
Overall bundle size: 49.3 KB (-1 B 0.00%) Bundle Size (system)
Overall bundle size: 54.06 KB (+8 B +0.01%) |
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.
Actionable comments posted: 0
Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Files selected for processing (5)
- packages/documentation/src/Components/Card.stories.tsx (1 hunks)
- packages/ui-components/src/components/Card/Card.tsx (2 hunks)
- packages/ui-components/src/components/Card/CardTypes.d.ts (1 hunks)
- packages/ui-components/src/components/Card/tests/Card.test.tsx (1 hunks)
- packages/ui-components/src/components/Card/utilities.ts (3 hunks)
Additional comments not posted (9)
packages/ui-components/src/components/Card/CardTypes.d.ts (1)
44-49
: LGTM! The new properties are well-defined.The
noBorder
property and the"darker"
mode option are correctly added with appropriate documentation and default values.packages/documentation/src/Components/Card.stories.tsx (2)
12-12
: LGTM! The newnoBorder
property is correctly added to the args.The
noBorder
property is added with a default value offalse
, which aligns with the PR objectives.
16-16
: LGTM! The new"darker"
mode option is correctly added to the argTypes.The
mode
prop now includes the"darker"
option, which aligns with the PR objectives.packages/ui-components/src/components/Card/utilities.ts (2)
13-14
: LGTM! The new properties are well-defined.The
noBorder
property and the"darker"
mode option are correctly added with appropriate documentation.
25-38
: LGTM! The new properties are correctly handled.The
noBorder
property and the"darker"
mode option are correctly handled in thegetCardClasses
function logic.packages/ui-components/src/components/Card/Card.tsx (2)
43-43
: LGTM! The newnoBorder
property is correctly added to the Card component props.The
noBorder
property is added with a default value offalse
, which aligns with the PR objectives.
61-61
: LGTM! The newnoBorder
property is correctly passed to thegetCardClasses
function.The
noBorder
property is correctly passed to thegetCardClasses
function, which aligns with the PR objectives.packages/ui-components/src/components/Card/__tests__/Card.test.tsx (2)
78-90
: Test case for "darker" mode looks good.The test case correctly verifies the rendering of the card with appropriate classes for the "darker" mode.
92-107
: Test case fornoBorder
property looks good.The test case correctly verifies the rendering of the card with appropriate classes for the
noBorder
property.
🤖 I have created a release *beep* *boop* --- <details><summary>ui-components: 5.20.0</summary> ## [5.20.0](ui-components-v5.19.6...ui-components-v5.20.0) (2024-07-06) ### Features * **Card:** adding support for darker mode and noBorder options ([#576](#576)) ([40c03e9](40c03e9)) </details> --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Co-authored-by: aversini <[email protected]>
Summary by CodeRabbit
New Features
noBorder
prop to theCard
component, allowing cards to be rendered without borders."darker"
mode option for theCard
component, providing an additional visual style.Tests
noBorder
prop and the"darker"
mode.Documentation
noBorder
prop and"darker"
mode option.