@julseb-lib/react 0.1.54 → 0.1.56
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 +6 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4212,6 +4212,7 @@ var ButtonGroup = ({
|
|
|
4212
4212
|
...rest
|
|
4213
4213
|
}) => {
|
|
4214
4214
|
const Element = element;
|
|
4215
|
+
const isMobile = useMaxWidth(600);
|
|
4215
4216
|
const elementProps = {
|
|
4216
4217
|
ref,
|
|
4217
4218
|
className: clsx(
|
|
@@ -4221,9 +4222,9 @@ var ButtonGroup = ({
|
|
|
4221
4222
|
"button-group",
|
|
4222
4223
|
className
|
|
4223
4224
|
),
|
|
4224
|
-
flexDirection: "row",
|
|
4225
|
+
flexDirection: isMobile ? "col" : "row",
|
|
4225
4226
|
flexWrap: "wrap",
|
|
4226
|
-
alignItems: "center",
|
|
4227
|
+
alignItems: isMobile ? "stretch" : "center",
|
|
4227
4228
|
...rest
|
|
4228
4229
|
};
|
|
4229
4230
|
if (buttons)
|
|
@@ -4232,7 +4233,7 @@ var ButtonGroup = ({
|
|
|
4232
4233
|
"button",
|
|
4233
4234
|
{
|
|
4234
4235
|
className: clsx(
|
|
4235
|
-
"px-2 py-1 outline-none h-
|
|
4236
|
+
"inline-flex justify-center items-center px-2 py-1 outline-none h-8",
|
|
4236
4237
|
size === "small" && "text-sm px-2 py-1",
|
|
4237
4238
|
genButtonDisabled[variant],
|
|
4238
4239
|
genRingColor[color],
|
|
@@ -4258,8 +4259,9 @@ var ButtonGroup = ({
|
|
|
4258
4259
|
"span",
|
|
4259
4260
|
{
|
|
4260
4261
|
className: clsx(
|
|
4261
|
-
"inline-block
|
|
4262
|
+
"inline-block",
|
|
4262
4263
|
genBgColorShort[color],
|
|
4264
|
+
isMobile ? "w-full h-[1px]" : " w-[1px] h-full",
|
|
4263
4265
|
"button-group-separator"
|
|
4264
4266
|
)
|
|
4265
4267
|
}
|