@julseb-lib/react 0.1.55 → 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.js CHANGED
@@ -4031,6 +4031,7 @@ var ButtonGroup = ({
4031
4031
  ...rest
4032
4032
  }) => {
4033
4033
  const Element = element;
4034
+ const isMobile = useMaxWidth(600);
4034
4035
  const elementProps = {
4035
4036
  ref,
4036
4037
  className: clsx(
@@ -4040,9 +4041,9 @@ var ButtonGroup = ({
4040
4041
  "button-group",
4041
4042
  className
4042
4043
  ),
4043
- flexDirection: "row",
4044
+ flexDirection: isMobile ? "col" : "row",
4044
4045
  flexWrap: "wrap",
4045
- alignItems: "center",
4046
+ alignItems: isMobile ? "stretch" : "center",
4046
4047
  ...rest
4047
4048
  };
4048
4049
  if (buttons)
@@ -4051,7 +4052,7 @@ var ButtonGroup = ({
4051
4052
  "button",
4052
4053
  {
4053
4054
  className: clsx(
4054
- "px-2 py-1 outline-none h-8",
4055
+ "inline-flex justify-center items-center px-2 py-1 outline-none h-8",
4055
4056
  size === "small" && "text-sm px-2 py-1",
4056
4057
  genButtonDisabled[variant],
4057
4058
  genRingColor[color],
@@ -4077,8 +4078,9 @@ var ButtonGroup = ({
4077
4078
  "span",
4078
4079
  {
4079
4080
  className: clsx(
4080
- "inline-block w-[1px] h-full",
4081
+ "inline-block",
4081
4082
  genBgColorShort[color],
4083
+ isMobile ? "w-full h-[1px]" : " w-[1px] h-full",
4082
4084
  "button-group-separator"
4083
4085
  )
4084
4086
  }