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

fix: Shrink API surface area, remove ChecklistCard #95

Merged
merged 19 commits into from
Feb 19, 2019
Merged

Conversation

mattcompiles
Copy link
Contributor

@mattcompiles mattcompiles commented Feb 14, 2019

NOTE: This is a breaking change, but we're releasing it as a fix to maintain the alpha v0.0.x versioning scheme.


Component Inheritance

High level components no longer inherit the props of lower level components.

Most notably, any white space props will need to be hoisted out into a separate usage of Box. For example:

-<Text paddingBottom="small">Hello</Text>

+<Box paddingBottom="small">
+  <Text>Hello</Text>
+</Box>

Alternatively, you can replace your component with a lower level Box component:

-<Card marginBottom="none">
+<Box backgroundColor="card">

This is a very deep change to the system, so please reach out to Braid maintainers if you need help.

ChecklistCard

We have removed the ChecklistCard component. If needed, it can be implemented manually in your app with Card and Divider components. For example:

<Card>
  <Box paddingLeft="gutter" paddingRight="gutter" paddingTop="small" paddingBottom="small">
    <Checkbox {...props} />
  </Box>
  <Divider />
  <Box paddingLeft="gutter" paddingRight="gutter" paddingTop="small" paddingBottom="small">
    <Checkbox {...props} />
  </Box>
</Card>

Since Card no longer inherits from Box, if you customised the Card in any way, you will need to use a Box instead:

-<Card>
+<Box backgroundColor="card" borderColor="standard" marginBottom="medium">

Copy link
Contributor

@mengtzu mengtzu left a comment

Choose a reason for hiding this comment

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

🎉 :shipit: 🎉

@markdalgleish
Copy link
Member

markdalgleish commented Feb 19, 2019

(EDIT: Moved release notes up to the original PR description)

@markdalgleish markdalgleish changed the title fix: Shrink API surface area fix: Shrink API surface area, remove ChecklistCard Feb 19, 2019
@markdalgleish markdalgleish merged commit 04297c3 into master Feb 19, 2019
@markdalgleish markdalgleish deleted the shrink-api branch February 19, 2019 06:12
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