Skip to content
This repository has been archived by the owner on May 16, 2022. It is now read-only.

Commit

Permalink
feat(💅): support h-full style
Browse files Browse the repository at this point in the history
Fixes #67
  • Loading branch information
z0al committed Jan 4, 2021
1 parent 2dd4a5b commit 907078b
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 22 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
node_modules/
build/
**/__tests__
43 changes: 22 additions & 21 deletions docs/styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,27 +225,28 @@
<details><summary>Show all styles</summary>

| Name | Style(s) |
| ---- | ----------------------- |
| h-0 | `{ height: 0 }` |
| h-1 | `{ height: rem(0.25) }` |
| h-10 | `{ height: rem(2.5) }` |
| h-12 | `{ height: rem(3) }` |
| h-16 | `{ height: rem(4) }` |
| h-2 | `{ height: rem(0.5) }` |
| h-20 | `{ height: rem(5) }` |
| h-24 | `{ height: rem(6) }` |
| h-3 | `{ height: rem(0.75) }` |
| h-32 | `{ height: rem(8) }` |
| h-4 | `{ height: rem(1) }` |
| h-40 | `{ height: rem(10) }` |
| h-48 | `{ height: rem(12) }` |
| h-5 | `{ height: rem(1.25) }` |
| h-56 | `{ height: rem(14) }` |
| h-6 | `{ height: rem(1.5) }` |
| h-64 | `{ height: rem(16) }` |
| h-8 | `{ height: rem(2) }` |
| h-px | `{ height: 1 }` |
| Name | Style(s) |
| ------ | ----------------------- |
| h-0 | `{ height: 0 }` |
| h-1 | `{ height: rem(0.25) }` |
| h-10 | `{ height: rem(2.5) }` |
| h-12 | `{ height: rem(3) }` |
| h-16 | `{ height: rem(4) }` |
| h-2 | `{ height: rem(0.5) }` |
| h-20 | `{ height: rem(5) }` |
| h-24 | `{ height: rem(6) }` |
| h-3 | `{ height: rem(0.75) }` |
| h-32 | `{ height: rem(8) }` |
| h-4 | `{ height: rem(1) }` |
| h-40 | `{ height: rem(10) }` |
| h-48 | `{ height: rem(12) }` |
| h-5 | `{ height: rem(1.25) }` |
| h-56 | `{ height: rem(14) }` |
| h-6 | `{ height: rem(1.5) }` |
| h-64 | `{ height: rem(16) }` |
| h-8 | `{ height: rem(2) }` |
| h-full | `{ height: "100%" }` |
| h-px | `{ height: 1 }` |

</details>

Expand Down
2 changes: 2 additions & 0 deletions src/__tests__/samples.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ pluginTester({
pluginName: 'babel-plugin-macros',
snapshot: true,
fixtures: path.join(__dirname, '__fixtures__'),
comments: true,
babelOptions: {
filename: __filename,
parserOpts: { plugins: ['jsx'] },
comments: true,
},
});
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": 64,
},
"h-full": Object {
"height": "100%",
},
"h-px": Object {
"height": 1,
},
Expand Down
3 changes: 3 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.ios
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": 64,
},
"h-full": Object {
"height": "100%",
},
"h-px": Object {
"height": 1,
},
Expand Down
3 changes: 3 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.node
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": "2rem",
},
"h-full": Object {
"height": "100%",
},
"h-px": Object {
"height": 1,
},
Expand Down
3 changes: 3 additions & 0 deletions src/lib/style/__tests__/__snapshots__/style.test.ts.snap.web
Original file line number Diff line number Diff line change
Expand Up @@ -1911,6 +1911,9 @@ Object {
"h-8": Object {
"height": "2rem",
},
"h-full": Object {
"height": "100%",
},
"h-px": Object {
"height": 1,
},
Expand Down
5 changes: 4 additions & 1 deletion src/lib/theme/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,10 @@ export const baseTheme = {
extrabold: '800' as '800',
black: '900' as '900',
},
height: spacing,
height: {
...spacing,
full: '100%',
},
letterSpacing: {
tighter: rem(-0.05),
tight: rem(-0.025),
Expand Down

0 comments on commit 907078b

Please sign in to comment.