@symbo.ls/atoms
Advanced tools
Comparing version 2.11.132 to 2.11.146
@@ -16,5 +16,8 @@ 'use strict' | ||
), | ||
'&': (key, props, result, element, isSubtree) => applyEndProps( | ||
'&': (key, props, result, element, isSubtree) => applyAndProps( | ||
key, props, isSubtree ? result : (result && result.selector), element | ||
), | ||
'>': (key, props, result, element, isSubtree) => applyAndProps( | ||
key, props, isSubtree ? result : (result && result.selector), element | ||
), | ||
$: (key, props, result, element, isSubtree) => applyCaseProps( | ||
@@ -91,3 +94,3 @@ key, props, isSubtree ? result : (result && result.case), element | ||
const applyEndProps = (key, props, result, element) => { | ||
const applyAndProps = (key, props, result, element) => { | ||
result[key] = convertPropsToClass(props, result, element) | ||
@@ -94,0 +97,0 @@ return result[key] |
{ | ||
"name": "@symbo.ls/atoms", | ||
"version": "2.11.132", | ||
"version": "2.11.146", | ||
"main": "index.js", | ||
"license": "MIT", | ||
"gitHead": "13027443598f113dd2b79ddf7aaf1adbd46d97d7", | ||
"gitHead": "b8899bfbe4ca5e7ed373cd5e2e6612aa330899ed", | ||
"dependencies": { | ||
@@ -8,0 +8,0 @@ "@domql/state": "latest", |
10
Text.js
'use strict' | ||
import { isObject } from '@domql/utils' | ||
import { getFontSizeByKey, getFontFamily } from '@symbo.ls/scratch' | ||
export const Text = { | ||
text: ({ key, props, state }) => { | ||
if (props.text === true) return (state && state[key]) || (props && props[key]) | ||
deps: { isObject, getFontSizeByKey, getFontFamily }, | ||
text: ({ key, props, state, deps }) => { | ||
if (deps.isObject(props) && props.text === true) return (state && state[key]) || (props && props[key]) | ||
return props.text | ||
}, | ||
class: { | ||
fontSize: ({ props }) => props.fontSize ? getFontSizeByKey(props.fontSize) : null, | ||
fontFamily: ({ props }) => props.fontFamily && ({ fontFamily: getFontFamily(props.fontFamily) || props.fontFamily }), | ||
fontSize: ({ props, deps }) => props.fontSize ? deps.getFontSizeByKey(props.fontSize) : null, | ||
fontFamily: ({ props, deps }) => props.fontFamily && ({ fontFamily: deps.getFontFamily(props.fontFamily) || props.fontFamily }), | ||
lineHeight: ({ props }) => props.lineHeight && ({ lineHeight: props.lineHeight }), | ||
@@ -14,0 +16,0 @@ // lineHeight: ({ props }) => props.lineHeight && getSpacingBasedOnRatio(props, 'lineHeight', null, ''), |
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
41217
1154