Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 5937e59

Browse files
committed
feat: enable all system on Text
1 parent 751c3c7 commit 5937e59

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

.prettierignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,6 @@ node_modules/
22
dist/
33
package.json
44
CHANGELOG.md
5-
.docz/
5+
.docz/
6+
website/public
7+
website/.cache

lerna.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
{
22
"lerna": "3.3.0",
3-
"packages": [
4-
"packages/*"
5-
],
3+
"packages": ["packages/*"],
64
"version": "11.1.2",
75
"npmClient": "yarn",
86
"useWorkspaces": true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"eslint-plugin-react-hooks": "^2.3.0",
5858
"jest": "^24.8.0",
5959
"lerna": "^3.19.0",
60+
"prettier": "^1.19.1",
6061
"react": "^16.12.0",
6162
"react-dom": "^16.12.0",
6263
"reakit": "^1.0.0-beta.12",

packages/shared/core/Text.js

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import React from 'react'
33
import { node, number, string, oneOfType, oneOf } from 'prop-desc'
44
import mergeRefs from 'react-merge-refs'
5-
import { th, compose, space, typography } from '@xstyled/system'
5+
import { th, system } from '@xstyled/system'
66
import { css, createComponent, getSystemPropTypes } from './util'
77
import * as theme from './theme/common'
88

@@ -17,11 +17,6 @@ function ellipsis({ lines = Infinity }) {
1717
`
1818
}
1919

20-
const system = compose(
21-
space,
22-
typography,
23-
)
24-
2520
export const TEXT_VARIANTS = [
2621
'h1',
2722
'h2',
@@ -42,7 +37,7 @@ export const Text = createComponent({
4237
{ theme, variant },
4338
) => {
4439
const variantConfig = variant ? theme.texts[variant] : null
45-
const As = asProp || ((variantConfig && variantConfig.defaultAs) || 'span')
40+
const As = asProp || (variantConfig && variantConfig.defaultAs) || 'span'
4641
const localRef = React.useRef()
4742
const [height, setHeight] = React.useState(null)
4843
React.useLayoutEffect(() => {

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7572,6 +7572,11 @@ prepend-http@^2.0.0:
75727572
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
75737573
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
75747574

7575+
prettier@^1.19.1:
7576+
version "1.19.1"
7577+
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.19.1.tgz#f7d7f5ff8a9cd872a7be4ca142095956a60797cb"
7578+
integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew==
7579+
75757580
pretty-format@^23.6.0:
75767581
version "23.6.0"
75777582
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-23.6.0.tgz#5eaac8eeb6b33b987b7fe6097ea6a8a146ab5760"

0 commit comments

Comments
 (0)