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

PD-549: Refactor Card component to be a styled wrapper for Box #306

Merged
merged 11 commits into from
Mar 9, 2020

Conversation

dominoweir
Copy link
Contributor

@dominoweir dominoweir commented Mar 6, 2020

✍️ Proposed changes

Refactor Card component to be a styled wrapper for Box

🎟 Jira ticket: PD-549(https://jira.mongodb.org/browse/PD-549)

🛠 Types of changes

  • Tooling (updates to workspace config or internal tooling)
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

✅ Checklist

  • I have added tests that prove my fix is effective or that my feature works
  • I have added necessary documentation (if appropriate)
  • I have run yarn changeset and documented my changes
  • I have added my new package to the global tsconfig
  • I have added my new package to the Table of Contents on the global README

💬 Further comments

| `as` | `HTML Tag` or `React Element` | Determines the root element. For example, `Link` or `a` tags can be supplied to replace `div` from being the DOM element that wraps the component. | `section` |
| `className` | `string` | Adds a className to the class attribute | |
| `children` | `node` | The children of the rendered inside of the `<Card/>` component. | |
Card is a styled wrapper for the Box component. Any properties you would pass to Box can also be passed to Card.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Not completely sure if this is the best wording, but I tried

Copy link
Collaborator

Choose a reason for hiding this comment

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

👍

@github-actions
Copy link
Contributor

github-actions bot commented Mar 6, 2020

Size Change: +11.9 kB (2%)

Total Size: 474 kB

Filename Size Change
packages/box/dist/index.node.js 7.01 kB +221 B (3%)
packages/box/dist/index.web.js 7.05 kB +217 B (3%)
packages/card/dist/index.node.js 7.05 kB +5.71 kB (81%) 🆘
packages/card/dist/index.web.js 7.08 kB +5.75 kB (81%) 🆘
ℹ️ View Unchanged
Filename Size Change
packages/badge/dist/index.node.js 1.92 kB 0 B
packages/badge/dist/index.web.js 1.92 kB 0 B
packages/button/dist/index.node.js 9.31 kB 0 B
packages/button/dist/index.web.js 9.35 kB 0 B
packages/checkbox/dist/index.node.js 74.1 kB 0 B
packages/checkbox/dist/index.web.js 74.1 kB 0 B
packages/code/dist/index.node.js 2.94 kB 0 B
packages/code/dist/index.web.js 2.94 kB 0 B
packages/emotion/dist/index.node.js 973 B 0 B
packages/emotion/dist/index.web.js 1.04 kB 0 B
packages/hooks/dist/index.node.js 2.44 kB 0 B
packages/hooks/dist/index.web.js 2.49 kB 0 B
packages/icon-button/dist/index.node.js 2.28 kB 0 B
packages/icon-button/dist/index.web.js 2.28 kB 0 B
packages/icon/dist/index.node.js 8.46 kB 0 B
packages/icon/dist/index.web.js 8.46 kB 0 B
packages/leafygreen-provider/dist/index.node.js 1.65 kB 0 B
packages/leafygreen-provider/dist/index.web.js 1.65 kB 0 B
packages/lib/dist/index.node.js 1.25 kB 0 B
packages/lib/dist/index.web.js 1.25 kB 0 B
packages/logo/dist/index.node.js 8.3 kB 0 B
packages/logo/dist/index.web.js 8.3 kB 0 B
packages/menu/dist/index.node.js 6.75 kB 0 B
packages/menu/dist/index.web.js 6.75 kB 0 B
packages/modal/dist/index.node.js 2.96 kB 0 B
packages/modal/dist/index.web.js 2.96 kB 0 B
packages/mongo-nav/dist/index.node.js 20.1 kB 0 B
packages/mongo-nav/dist/index.web.js 20.2 kB 0 B
packages/palette/dist/index.node.js 1.17 kB 0 B
packages/palette/dist/index.web.js 1.17 kB 0 B
packages/pipeline/dist/index.node.js 12.9 kB 0 B
packages/pipeline/dist/index.web.js 12.9 kB 0 B
packages/popover/dist/index.node.js 4.13 kB 0 B
packages/popover/dist/index.web.js 4.13 kB 0 B
packages/portal/dist/index.node.js 1.71 kB 0 B
packages/portal/dist/index.web.js 1.71 kB 0 B
packages/radio-box-group/dist/index.node.js 3.79 kB 0 B
packages/radio-box-group/dist/index.web.js 3.8 kB 0 B
packages/radio-group/dist/index.node.js 2.93 kB 0 B
packages/radio-group/dist/index.web.js 2.93 kB 0 B
packages/side-nav/dist/index.node.js 8.7 kB 0 B
packages/side-nav/dist/index.web.js 8.75 kB 0 B
packages/syntax/dist/index.node.js 21.7 kB 0 B
packages/syntax/dist/index.web.js 21.7 kB 0 B
packages/tabs/dist/index.node.js 9.51 kB 0 B
packages/tabs/dist/index.web.js 9.55 kB 0 B
packages/text-input/dist/index.node.js 3.19 kB 0 B
packages/text-input/dist/index.web.js 3.19 kB 0 B
packages/theme/dist/index.node.js 940 B 0 B
packages/theme/dist/index.web.js 940 B 0 B
packages/toggle/dist/index.node.js 4.29 kB 0 B
packages/toggle/dist/index.web.js 4.29 kB 0 B
packages/tooltip/dist/index.node.js 4.5 kB 0 B
packages/tooltip/dist/index.web.js 4.56 kB 0 B

compressed-size-action

@bruugey
Copy link
Collaborator

bruugey commented Mar 6, 2020

Don't forget to fix the test suite @dominoweir

Copy link
Collaborator

@bruugey bruugey left a comment

Choose a reason for hiding this comment

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

LGTM, great work!

@dominoweir dominoweir merged commit 208d881 into master Mar 9, 2020
@dominoweir dominoweir deleted the PD-549 branch March 9, 2020 17:42
bruugey pushed a commit that referenced this pull request Aug 9, 2023
* initial commit

* make Box root element of Card

* thank u Brooke

* fix Box exports

* update readme and rename prop

* yarn changeset

* fix breaking tests
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.

3 participants