ywana-core8 0.0.878 → 0.0.879
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/dist/index.cjs +3 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +3 -6
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +3 -6
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/html/text.js +2 -2
- package/src/html/textfield.js +1 -1
package/package.json
CHANGED
package/src/html/text.js
CHANGED
@@ -14,7 +14,7 @@ export const TEXTFORMATS = {
|
|
14
14
|
/**
|
15
15
|
* Text
|
16
16
|
*/
|
17
|
-
export const Text = ({ format, children
|
17
|
+
export const Text = ({ format, children }) => {
|
18
18
|
|
19
19
|
const site = useContext(SiteContext)
|
20
20
|
let value = children
|
@@ -31,6 +31,6 @@ export const Text = ({ format, children, className }) => {
|
|
31
31
|
case TEXTFORMATS.NUMERIC: value = formatter.format(children); break;
|
32
32
|
}
|
33
33
|
|
34
|
-
return children ?
|
34
|
+
return children ? value : ''
|
35
35
|
|
36
36
|
}
|
package/src/html/textfield.js
CHANGED
@@ -45,7 +45,7 @@ export const TextField = (props) => {
|
|
45
45
|
const labelPositionStyle = labelPosition == 'left' ? "label-left" : "label-top"
|
46
46
|
const style = `${labelStyle} ${labelPositionStyle} ${borderStyle} textfield-${type}`
|
47
47
|
const labelTxt = <Text>{label}</Text>
|
48
|
-
const placeholderTxt = <Text>{placeholder}</Text>
|
48
|
+
const placeholderTxt = placeholder ? <Text>{placeholder}</Text> : null
|
49
49
|
|
50
50
|
return (
|
51
51
|
<div className={`${style} ${id}`} onClick={onClick}>
|