@secondstaxorg/sscomp 1.5.4 → 1.5.6
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.es.js +2 -2
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +28 -4
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/package.json +1 -1
- package/types/components/Button/type.d.ts +1 -0
- package/types/components/ButtonOutline/type.d.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -220,8 +220,20 @@ const _jsxFileName$10 = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\compo
|
|
|
220
220
|
* Solid and Outline buttons
|
|
221
221
|
*/
|
|
222
222
|
const Button$1 = (props) => {
|
|
223
|
-
const {variant, size, disabled,children} = props;
|
|
224
|
-
|
|
223
|
+
const {variant, size, disabled,children,width} = props;
|
|
224
|
+
const [btnWidth,setBtnWidth] = React$1.useState('100%');
|
|
225
|
+
|
|
226
|
+
React$1.useEffect(()=>{
|
|
227
|
+
if (typeof width === "number"){
|
|
228
|
+
setBtnWidth(width);
|
|
229
|
+
}else if (width === 'full'){
|
|
230
|
+
setBtnWidth('100%');
|
|
231
|
+
}else if (width === 'fit-content'){
|
|
232
|
+
setBtnWidth('fit-content');
|
|
233
|
+
}
|
|
234
|
+
},[width]);
|
|
235
|
+
|
|
236
|
+
return React$1.createElement(ButtonComp, { className: `${variant} ${size}`, disabled: disabled, ...props, style: {width:btnWidth}, __self: undefined, __source: {fileName: _jsxFileName$10, lineNumber: 22}}, children)
|
|
225
237
|
};
|
|
226
238
|
|
|
227
239
|
const Container$b = styled.div`
|
|
@@ -1482,8 +1494,20 @@ const OutlineButtonComp = styled.button`
|
|
|
1482
1494
|
|
|
1483
1495
|
const _jsxFileName$U = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\ButtonOutline\\OutlineButton.tsx";
|
|
1484
1496
|
const OutlineButton = (props) => {
|
|
1485
|
-
const {size, variant, disabled, children} = props;
|
|
1486
|
-
|
|
1497
|
+
const {size, variant, disabled, children,width} = props;
|
|
1498
|
+
const [btnWidth,setBtnWidth] = React$1.useState('100%');
|
|
1499
|
+
|
|
1500
|
+
React$1.useEffect(()=>{
|
|
1501
|
+
if (typeof width === "number"){
|
|
1502
|
+
setBtnWidth(width);
|
|
1503
|
+
}else if (width === 'full'){
|
|
1504
|
+
setBtnWidth('100%');
|
|
1505
|
+
}else if (width === 'fit-content'){
|
|
1506
|
+
setBtnWidth('fit-content');
|
|
1507
|
+
}
|
|
1508
|
+
},[width]);
|
|
1509
|
+
|
|
1510
|
+
return React$1.createElement(OutlineButtonComp, { className: `${!variant ? 'base' : variant} ${size} with-bg`, disabled: disabled, ...props, __self: undefined, __source: {fileName: _jsxFileName$U, lineNumber: 19}}, children)
|
|
1487
1511
|
};
|
|
1488
1512
|
|
|
1489
1513
|
const _jsxFileName$T = "D:\\SSX\\Project\\Component Library\\sscomp\\src\\components\\LoadingSpinner\\LoadingSpinner.tsx";
|