@symbo.ls/atoms 2.11.113 → 2.11.117
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Block.js +11 -1
- package/Text.js +2 -0
- package/package.json +2 -2
package/Block.js
CHANGED
|
@@ -171,6 +171,16 @@ export const List = {
|
|
|
171
171
|
|
|
172
172
|
export const Gutter = {
|
|
173
173
|
props: {
|
|
174
|
-
|
|
174
|
+
size: 'C1'
|
|
175
175
|
},
|
|
176
|
+
class: {
|
|
177
|
+
size: ({ props }) => {
|
|
178
|
+
if (typeof props.size !== 'string') return
|
|
179
|
+
const [height, width] = props.size.split(' ')
|
|
180
|
+
return {
|
|
181
|
+
...getSpacingByKey(height, 'height'),
|
|
182
|
+
...getSpacingByKey(width || height, 'width')
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
}
|
|
176
186
|
}
|
package/Text.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
|
+
import { isString, replaceLiteralsWithObjectFields } from '@domql/utils'
|
|
3
4
|
import { getFontSizeByKey, getFontFamily } from '@symbo.ls/scratch'
|
|
4
5
|
|
|
5
6
|
export const Text = {
|
|
6
7
|
text: ({ key, props, state }) => {
|
|
7
8
|
if (props.text === true) return (state && state[key]) || (props && props[key])
|
|
9
|
+
if (isString(props.text) && props.text.includes('{{')) return replaceLiteralsWithObjectFields(props.text, state)
|
|
8
10
|
return props.text
|
|
9
11
|
},
|
|
10
12
|
class: {
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@symbo.ls/atoms",
|
|
3
|
-
"version": "2.11.
|
|
3
|
+
"version": "2.11.117",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"gitHead": "
|
|
6
|
+
"gitHead": "d1e61a60ae2da2782dd01e41e16992d61359d95b",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@domql/state": "latest",
|
|
9
9
|
"@domql/utils": "latest",
|