Skip to content

Commit

Permalink
fix(atoms): adjust card size
Browse files Browse the repository at this point in the history
  • Loading branch information
yeehaa123 committed Jun 5, 2018
1 parent 7be7ff3 commit 061819a
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 20 deletions.
7 changes: 4 additions & 3 deletions packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "offcourse-app",
"name": "app",
"version": "0.0.1",
"description": "",
"main": "index.js",
Expand All @@ -26,11 +26,12 @@
]
},
"dependencies": {
"@offcourse/atoms": "^1.1.0",
"@offcourse/organisms": "^1.0.0",
"@offcourse/atoms": "^0.0.0-semantically-released",
"@offcourse/organisms": "^1.0.1",
"babel-plugin-styled-components": "^1.1.5",
"next": "6.0.2",
"next-progressbar": "0.0.2",
"ramda": "^0.25.0",
"react": "^16.3.2",
"react-dom": "^16.3.2",
"system-components": "^2.0.3"
Expand Down
19 changes: 11 additions & 8 deletions packages/app/pages/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import Head from "next/head";
import { times, identity } from "ramda";
import { ThemeProvider, injectGlobal } from "styled-components";
import { offcourse as theme } from "../themes";
import { Card, Heading, Group, Button, Masonry, Text } from "@offcourse/atoms";
Expand Down Expand Up @@ -33,14 +34,16 @@ class Content extends React.Component {
state = { items: fragments };

render() {
const sizes = [
{ columns: 1, gutter: 16 },
{ mq: "650px", columns: 2, gutter: 16 },
{ mq: "975px", columns: 3, gutter: 16 },
{ mq: "1300px", columns: 4, gutter: 16 },
{ mq: "1625px", columns: 5, gutter: 16 },
{ mq: "1950px", columns: 6, gutter: 16 }
];
const gutter = 16;
const sizes = times(identity, 100).map(columns => {
const mq = `${columns * 288 + (columns - 1) * 16}px`;
console.log(mq);
return {
columns,
mq,
gutter
};
});

const { items } = this.state;

Expand Down
6 changes: 3 additions & 3 deletions packages/atoms/src/Button/Button.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ class Button extends Component {
const disabled = this.props.disabled || this.props.loading;

const widths = {
small: "6.25rem",
medium: "9.375rem",
large: "18.75rem"
small: "5.33333rem",
medium: "8rem",
large: "16rem"
};

const text = formatTitle(children);
Expand Down
2 changes: 1 addition & 1 deletion packages/atoms/src/Card/CardWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import system from "system-components";

const CardWrapper = system({
display: "block",
width: ["100%", "20.75rem", "20.75rem"],
width: ["100%", "18rem", "18rem"],
bg: "grayScale.0"
}).extend`
section:last-child {
Expand Down
2 changes: 1 addition & 1 deletion packages/documentation/src/pages.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ const pages = [
{
path: "/contact",
title: "Contact",
content: pageLoader("./contact")
content: pageLoader("./contact.md")
}
];

Expand Down
27 changes: 23 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,18 @@
react-sortable-hoc "^0.8.3"
voca "^1.4.0"

"@offcourse/molecules@^1.0.1":
version "1.0.2"
resolved "https://registry.yarnpkg.com/@offcourse/molecules/-/molecules-1.0.2.tgz#22b8011323b4dd5ab56ca218564f2c04e55964e9"
dependencies:
"@offcourse/atoms" "^1.1.0"
atoms "^0.2.0"
ramda "^0.25.0"
react-copy-to-clipboard "^5.0.1"
react-sidebar "^2.3.2"
react-sortable-hoc "^0.8.3"
voca "^1.4.0"

"@offcourse/organisms@^1.0.0":
version "1.0.0"
resolved "https://registry.yarnpkg.com/@offcourse/organisms/-/organisms-1.0.0.tgz#3bdd3e03726a3d635fd4ebcffb7d5d23b989ac22"
Expand All @@ -800,6 +812,17 @@
voca "^1.4.0"
yup "^0.25.1"

"@offcourse/organisms@^1.0.1":
version "1.0.1"
resolved "https://registry.yarnpkg.com/@offcourse/organisms/-/organisms-1.0.1.tgz#c1ea8ddd054425cdcc240f403f39560e9d896306"
dependencies:
"@offcourse/atoms" "^1.1.0"
"@offcourse/molecules" "^1.0.1"
formik "^0.11.11"
ramda "^0.25.0"
voca "^1.4.0"
yup "^0.25.1"

"@semantic-release/commit-analyzer@^5.0.0":
version "5.0.3"
resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-5.0.3.tgz#f2b674d30207b49b77d905ad5850d7aefd8838dd"
Expand Down Expand Up @@ -7539,10 +7562,6 @@ normalize-url@^3.0.0:
version "3.0.1"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.0.1.tgz#2cff7f20468c75e0e968552b7caac77a51ebcae6"

now@^11.2.1:
version "11.2.1"
resolved "https://registry.yarnpkg.com/now/-/now-11.2.1.tgz#33fea6a78a464e554780e4a6134d1a98b7e9f49e"

npm-bundled@^1.0.1:
version "1.0.3"
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"
Expand Down

0 comments on commit 061819a

Please sign in to comment.