@hixme-ui/text
Advanced tools
Comparing version 1.3.0 to 1.5.0
@@ -11,3 +11,3 @@ 'use strict'; | ||
var _templateObject = (0, _taggedTemplateLiteral3.default)(['\n color: ', ';\n font-size: ', ';\n font-weight: ', '\n border-bottom: ', ';\n cursor: ', ';\n display: ', ';\n justify-content: ', ';\n line-height: ', ';\n text-align: ', ';\n text-indent: ', ';\n text-transform: ', ';\n text-overflow: ', ';\n user-select: ', ';\n white-space: ', ';\n width: ', ';\n word-break: ', ';\n'], ['\n color: ', ';\n font-size: ', ';\n font-weight: ', '\n border-bottom: ', ';\n cursor: ', ';\n display: ', ';\n justify-content: ', ';\n line-height: ', ';\n text-align: ', ';\n text-indent: ', ';\n text-transform: ', ';\n text-overflow: ', ';\n user-select: ', ';\n white-space: ', ';\n width: ', ';\n word-break: ', ';\n']); | ||
var _templateObject = (0, _taggedTemplateLiteral3.default)(['\n color: ', ';\n font-family: ', ';\n font-size: ', ';\n font-weight: ', ';\n border-bottom: ', ';\n cursor: ', ';\n ', ';\n justify-content: ', ';\n line-height: ', ';\n text-align: ', ';\n text-indent: ', ';\n text-transform: ', ';\n text-overflow: ', ';\n user-select: ', ';\n white-space: ', ';\n width: ', ';\n word-break: ', ';\n'], ['\n color: ', ';\n font-family: ', ';\n font-size: ', ';\n font-weight: ', ';\n border-bottom: ', ';\n cursor: ', ';\n ', ';\n justify-content: ', ';\n line-height: ', ';\n text-align: ', ';\n text-indent: ', ';\n text-transform: ', ';\n text-overflow: ', ';\n user-select: ', ';\n white-space: ', ';\n width: ', ';\n word-break: ', ';\n']); | ||
@@ -25,2 +25,4 @@ var _styledComponents = require('styled-components'); | ||
}, function (props) { | ||
return props.fontFamily || (0, _themeProps.getFontFamily)(props); | ||
}, function (props) { | ||
return props.fontSize || (0, _themeProps.getFontSize)(props); | ||
@@ -37,3 +39,3 @@ }, function (props) { | ||
}, function (props) { | ||
return props.display || 'inline-flex'; | ||
return props.display && 'display: ' + props.display; | ||
}, function (props) { | ||
@@ -50,3 +52,2 @@ if (props.right) return 'flex-end'; | ||
if (props.right) return 'right'; | ||
return 'inherit'; | ||
@@ -53,0 +54,0 @@ }, function (props) { |
{ | ||
"name": "@hixme-ui/text", | ||
"version": "1.3.0", | ||
"version": "1.5.0", | ||
"description": "hixme-ui text component. For all your communictation needs.", | ||
@@ -45,4 +45,3 @@ "publishConfig": { | ||
"devDependencies": { | ||
"@hixme-ui/theme": "^1.3.0", | ||
"babel": "^6.23.0", | ||
"@hixme-ui/theme": "^1.5.0", | ||
"babel-cli": "^6.26.0", | ||
@@ -84,3 +83,3 @@ "babel-core": "^6.26.0", | ||
"react-addons-test-utils": "^15.0.0", | ||
"react-test-renderer": "^15.6.2", | ||
"react-test-renderer": "^16.0.0", | ||
"regenerator-runtime": "^0.11.0", | ||
@@ -96,5 +95,5 @@ "rimraf": "^2.6.1", | ||
"prop-types": "^15.6.0", | ||
"react": "^15.6.2", | ||
"react": "^16.0.0", | ||
"styled-components": "^2.2.2" | ||
} | ||
} |
import styled from 'styled-components' | ||
import { | ||
getTextColor, | ||
getFontFamily, | ||
getFontSize, | ||
getFontWeight, | ||
getTextColor, | ||
} from '@hixme-ui/theme-props' | ||
@@ -10,4 +11,5 @@ | ||
color: ${props => props.color || getTextColor(props)}; | ||
font-family: ${props => props.fontFamily || getFontFamily(props)}; | ||
font-size: ${props => props.fontSize || getFontSize(props)}; | ||
font-weight: ${props => props.fontWeight || getFontWeight(props)} | ||
font-weight: ${props => props.fontWeight || getFontWeight(props)}; | ||
border-bottom: ${(props) => { | ||
@@ -22,3 +24,3 @@ if (props.dashed) return '1px dashed' | ||
}}; | ||
display: ${props => props.display || 'inline-flex'}; | ||
${props => props.display && `display: ${props.display}`}; | ||
justify-content: ${(props) => { | ||
@@ -35,3 +37,2 @@ if (props.right) return 'flex-end' | ||
if (props.right) return 'right' | ||
return 'inherit' | ||
@@ -38,0 +39,0 @@ }}; |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
22194
43
241
0
+ Addedreact@16.14.0(transitive)
- Removedcreate-react-class@15.7.0(transitive)
- Removedreact@15.7.0(transitive)
Updatedreact@^16.0.0