dce-reactkit 3.9.5 → 3.9.7
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/cjs/index.js +6 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/CheckboxButton.d.ts +1 -0
- package/dist/esm/index.js +6 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/CheckboxButton.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/CheckboxButton.tsx +21 -3
package/dist/index.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -46,6 +46,8 @@ type Props = {
|
|
|
46
46
|
small?: boolean,
|
|
47
47
|
// If true, show a dash in the checkbox (only relevant if unchecked)
|
|
48
48
|
dashed?: boolean,
|
|
49
|
+
// If true, use complex formatting (tabs, newlines) in the text
|
|
50
|
+
useComplexFormatting?: boolean,
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
/*------------------------------------------------------------------------*/
|
|
@@ -80,6 +82,7 @@ const CheckboxButton: React.FC<Props> = (props) => {
|
|
|
80
82
|
),
|
|
81
83
|
small,
|
|
82
84
|
dashed,
|
|
85
|
+
useComplexFormatting,
|
|
83
86
|
} = props;
|
|
84
87
|
|
|
85
88
|
/*------------------------------------------------------------------------*/
|
|
@@ -121,9 +124,24 @@ const CheckboxButton: React.FC<Props> = (props) => {
|
|
|
121
124
|
className="me-1"
|
|
122
125
|
/>
|
|
123
126
|
</div>
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
+
{
|
|
128
|
+
useComplexFormatting
|
|
129
|
+
? (
|
|
130
|
+
<pre
|
|
131
|
+
className="ps-2 text-start text-break"
|
|
132
|
+
style={{
|
|
133
|
+
whiteSpace: 'pre-wrap',
|
|
134
|
+
}}
|
|
135
|
+
>
|
|
136
|
+
{text}
|
|
137
|
+
</pre>
|
|
138
|
+
)
|
|
139
|
+
: (
|
|
140
|
+
<div className="flex-grow-1 text-start text-break ps-2">
|
|
141
|
+
{text}
|
|
142
|
+
</div>
|
|
143
|
+
)
|
|
144
|
+
}
|
|
127
145
|
</div>
|
|
128
146
|
</button>
|
|
129
147
|
);
|