Skip to content

Commit

Permalink
feat(card): Adds base styles and example for card
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Raider committed Feb 27, 2019
1 parent ad35872 commit a4396d4
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/ray/lib/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,7 @@ li {
margin: 0;
padding: 0;
}

.responsive-image {
width: 100%;
}
14 changes: 14 additions & 0 deletions packages/ray/lib/_card.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
$card-padding: 1rem;
$card-border-color: #e6e6e6;

.card {
width: 100%;
border: 1px solid $card-border-color;
border-radius: $border-radius;
background-color: $white;
overflow: hidden;

&__content {
padding: $card-padding;
}
}
6 changes: 3 additions & 3 deletions packages/ray/lib/_typography.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ p {
margin-bottom: 5px;

@include tablet {
font-size: 18px;
line-height: 28px;
font-size: 20px;
line-height: 32px;
}
}

.h3 {
font-size: 18px;
font-size: 20px;
font-weight: 600;
line-height: 28px;
margin-bottom: 10px;
Expand Down
1 change: 1 addition & 0 deletions packages/ray/lib/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@
@import 'grid';
@import 'typography';
@import 'forms';
@import 'card';

@import 'buttons';
30 changes: 30 additions & 0 deletions packages/ray/stories/card.stories.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
import React from 'react';
import { storiesOf } from '@storybook/react';

storiesOf('Card', module).addWithJSX('All', () => (
<div
style={{
padding: '1rem',
maxWidth: '600px'
}}
>
<div className="card">
<img
className="responsive-image"
src="https://source.unsplash.com/random/800x450"
/>

<div className="card__content">
<h2 className="h3" style={{ marginTop: 0 }}>
Spacetravel guidelines
</h2>
<p className="copy2">
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Dolorem
atque minima itaque sint! Doloremque odio quia saepe unde sunt neque
quam quibusdam in, nihil beatae, consequatur cumque? Cupiditate, quia
facilis.
</p>
</div>
</div>
</div>
));

0 comments on commit a4396d4

Please sign in to comment.