-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Plans: Add plan features to Plan Overview page #1565
Changes from all commits
014d17e
7cb4c12
a87a94f
cf46a83
6e8bd3b
cff7f9a
3fad72f
744f095
a683c54
bc602be
044607b
8b7c1ab
2550ef3
f8f19c9
ade5b36
85dd88a
6f50710
da0f835
a118680
1112d29
8ac0528
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* External dependencies | ||
*/ | ||
import React from 'react'; | ||
|
||
/** | ||
* Internal dependencies | ||
*/ | ||
import Button from 'components/button'; | ||
import CompactCard from 'components/card/compact'; | ||
|
||
const PlanFeature = ( { button, description, heading } ) => { | ||
return ( | ||
<CompactCard className="plan-feature"> | ||
<div> | ||
<strong className="plan-feature__heading">{ heading }</strong> | ||
<span>{ description }</span> | ||
</div> | ||
{ button && | ||
<Button | ||
className="plan-feature__button" | ||
href={ button.href } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Talking a bit with @breezyskies... can we try a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just to loop back, PR started in #1820 for this. |
||
primary> | ||
{ button.label } | ||
</Button> | ||
} | ||
</CompactCard> | ||
); | ||
}; | ||
|
||
PlanFeature.propTypes = { | ||
button: React.PropTypes.shape( { | ||
label: React.PropTypes.string.isRequired, | ||
href: React.PropTypes.string.isRequired | ||
} ), | ||
description: React.PropTypes.string.isRequired, | ||
heading: React.PropTypes.string.isRequired | ||
}; | ||
|
||
export default PlanFeature; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.plan-feature__heading { | ||
display: block; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
.plan-overview { | ||
.plan-feature__button, | ||
.plan-status__button { | ||
flex-shrink: 0; | ||
min-width: 160px; | ||
text-align: center; | ||
|
||
@include breakpoint( "<480px" ) { | ||
margin-top: 15px; | ||
width: 100%; | ||
} | ||
|
||
@include breakpoint( ">480px" ) { | ||
margin-left: 15px; | ||
} | ||
} | ||
} | ||
|
||
.plan-overview { | ||
.plan-feature, | ||
.plan-status__info { | ||
align-content: space-between; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-between; | ||
|
||
@include breakpoint( ">480px" ) { | ||
flex-direction: row; | ||
align-items: center; | ||
} | ||
|
||
&:after { | ||
display: none; | ||
} | ||
} | ||
} |
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.
Could we use
compact
buttons here? I think it will look better given the space and the repetition.