Skip to content

Commit d1b00e6

Browse files
committed
fix(atoms): adjust card size
1 parent a1e8fab commit d1b00e6

File tree

6 files changed

+43
-20
lines changed

6 files changed

+43
-20
lines changed

packages/app/package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "offcourse-app",
2+
"name": "app",
33
"version": "0.0.1",
44
"description": "",
55
"main": "index.js",
@@ -26,11 +26,12 @@
2626
]
2727
},
2828
"dependencies": {
29-
"@offcourse/atoms": "^1.1.0",
30-
"@offcourse/organisms": "^1.0.0",
29+
"@offcourse/atoms": "^0.0.0-semantically-released",
30+
"@offcourse/organisms": "^1.0.1",
3131
"babel-plugin-styled-components": "^1.1.5",
3232
"next": "6.0.2",
3333
"next-progressbar": "0.0.2",
34+
"ramda": "^0.25.0",
3435
"react": "^16.3.2",
3536
"react-dom": "^16.3.2",
3637
"system-components": "^2.0.3"

packages/app/pages/index.js

+11-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import Head from "next/head";
2+
import { times, identity } from "ramda";
23
import { ThemeProvider, injectGlobal } from "styled-components";
34
import { offcourse as theme } from "../themes";
45
import { Card, Heading, Group, Button, Masonry, Text } from "@offcourse/atoms";
@@ -33,14 +34,16 @@ class Content extends React.Component {
3334
state = { items: fragments };
3435

3536
render() {
36-
const sizes = [
37-
{ columns: 1, gutter: 16 },
38-
{ mq: "650px", columns: 2, gutter: 16 },
39-
{ mq: "975px", columns: 3, gutter: 16 },
40-
{ mq: "1300px", columns: 4, gutter: 16 },
41-
{ mq: "1625px", columns: 5, gutter: 16 },
42-
{ mq: "1950px", columns: 6, gutter: 16 }
43-
];
37+
const gutter = 16;
38+
const sizes = times(identity, 100).map(columns => {
39+
const mq = `${columns * 288 + (columns - 1) * 16}px`;
40+
console.log(mq);
41+
return {
42+
columns,
43+
mq,
44+
gutter
45+
};
46+
});
4447

4548
const { items } = this.state;
4649

packages/atoms/src/Button/Button.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@ class Button extends Component {
6060
const disabled = this.props.disabled || this.props.loading;
6161

6262
const widths = {
63-
small: "6.25rem",
64-
medium: "9.375rem",
65-
large: "18.75rem"
63+
small: "5.33333rem",
64+
medium: "8rem",
65+
large: "16rem"
6666
};
6767

6868
const text = formatTitle(children);

packages/atoms/src/Card/CardWrapper.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import system from "system-components";
22

33
const CardWrapper = system({
44
display: "block",
5-
width: ["100%", "20.75rem", "20.75rem"],
5+
width: ["100%", "18rem", "18rem"],
66
bg: "grayScale.0"
77
}).extend`
88
section:last-child {

packages/documentation/src/pages.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ const pages = [
9090
{
9191
path: "/contact",
9292
title: "Contact",
93-
content: pageLoader("./contact")
93+
content: pageLoader("./contact.md")
9494
}
9595
];
9696

yarn.lock

+23-4
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,18 @@
789789
react-sortable-hoc "^0.8.3"
790790
voca "^1.4.0"
791791

792+
"@offcourse/molecules@^1.0.1":
793+
version "1.0.2"
794+
resolved "https://registry.yarnpkg.com/@offcourse/molecules/-/molecules-1.0.2.tgz#22b8011323b4dd5ab56ca218564f2c04e55964e9"
795+
dependencies:
796+
"@offcourse/atoms" "^1.1.0"
797+
atoms "^0.2.0"
798+
ramda "^0.25.0"
799+
react-copy-to-clipboard "^5.0.1"
800+
react-sidebar "^2.3.2"
801+
react-sortable-hoc "^0.8.3"
802+
voca "^1.4.0"
803+
792804
"@offcourse/organisms@^1.0.0":
793805
version "1.0.0"
794806
resolved "https://registry.yarnpkg.com/@offcourse/organisms/-/organisms-1.0.0.tgz#3bdd3e03726a3d635fd4ebcffb7d5d23b989ac22"
@@ -800,6 +812,17 @@
800812
voca "^1.4.0"
801813
yup "^0.25.1"
802814

815+
"@offcourse/organisms@^1.0.1":
816+
version "1.0.1"
817+
resolved "https://registry.yarnpkg.com/@offcourse/organisms/-/organisms-1.0.1.tgz#c1ea8ddd054425cdcc240f403f39560e9d896306"
818+
dependencies:
819+
"@offcourse/atoms" "^1.1.0"
820+
"@offcourse/molecules" "^1.0.1"
821+
formik "^0.11.11"
822+
ramda "^0.25.0"
823+
voca "^1.4.0"
824+
yup "^0.25.1"
825+
803826
"@semantic-release/commit-analyzer@^5.0.0":
804827
version "5.0.3"
805828
resolved "https://registry.yarnpkg.com/@semantic-release/commit-analyzer/-/commit-analyzer-5.0.3.tgz#f2b674d30207b49b77d905ad5850d7aefd8838dd"
@@ -7539,10 +7562,6 @@ normalize-url@^3.0.0:
75397562
version "3.0.1"
75407563
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.0.1.tgz#2cff7f20468c75e0e968552b7caac77a51ebcae6"
75417564

7542-
now@^11.2.1:
7543-
version "11.2.1"
7544-
resolved "https://registry.yarnpkg.com/now/-/now-11.2.1.tgz#33fea6a78a464e554780e4a6134d1a98b7e9f49e"
7545-
75467565
npm-bundled@^1.0.1:
75477566
version "1.0.3"
75487567
resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308"

0 commit comments

Comments
 (0)