Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Commit

Permalink
refactor: support height prop for Card component
Browse files Browse the repository at this point in the history
  • Loading branch information
mrfelton committed Jun 5, 2019
1 parent 3456bc0 commit f8fdada
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion renderer/components/UI/Card.js
@@ -1,9 +1,13 @@
import React from 'react'
import styled from 'styled-components'
import { height } from 'styled-system'
import { Card as BaseCard } from 'rebass'

const StyledCard = styled(BaseCard)(height)

const Card = React.forwardRef((props, ref) => {
return (
<BaseCard
<StyledCard
ref={ref}
as="section"
bg="primaryColor"
Expand Down
4 changes: 2 additions & 2 deletions test/unit/components/UI/__snapshots__/Card.spec.js.snap
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`component.UI.Card should render correctly 1`] = `
<Styled(styled.div)
<Styled(Styled(styled.div))
as="section"
bg="primaryColor"
borderRadius={5}
Expand All @@ -10,5 +10,5 @@ exports[`component.UI.Card should render correctly 1`] = `
p={3}
>
content
</Styled(styled.div)>
</Styled(Styled(styled.div))>
`;

0 comments on commit f8fdada

Please sign in to comment.