Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/dull-geese-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@leafygreen-ui/card': patch
---

Add children to Card type
1 change: 1 addition & 0 deletions packages/card/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Card is a styled wrapper for the Box component. Any properties you would pass to

| Prop | Type | Description | Default |
| -------------- | ----------------------- | ----------------------------------------------------------------- | ----------------------------------------------------------------------- |
| `children` | `React.ReactNode` | Content rendered inside of the `<Card />` component | |
| `className` | `string` | Adds a className to the class attribute | |
| `contentStyle` | `'none'`, `'clickable'` | Whether the card should display as a visually clickable element. | `'clickable'` when a valid `onClick` handler or `href` link is provided |
| `darkMode` | `boolean` | Determines whether or not the component will appear in dark mode. | `false` |
Expand Down
5 changes: 5 additions & 0 deletions packages/card/src/Card/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export const ContentStyle = {
export type ContentStyle = (typeof ContentStyle)[keyof typeof ContentStyle];

export interface InternalCardProps extends DarkModeProps {
/**
* The content that will appear inside of the `<Card />` component.
*/
children?: React.ReactNode;

/**
* Determines whether the Card should be styled as clickable.
*
Expand Down
Loading