@octaviaflow/core 3.0.7 → 3.0.9
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/components/Button/Button.d.ts +14 -1
- package/dist/components/Button/Button.d.ts.map +1 -1
- package/dist/components/Sidebar/Sidebar.d.ts +13 -0
- package/dist/components/Sidebar/Sidebar.d.ts.map +1 -1
- package/dist/index.cjs +5 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -645,10 +645,14 @@ function Button({
|
|
|
645
645
|
className,
|
|
646
646
|
children,
|
|
647
647
|
type,
|
|
648
|
+
cursor,
|
|
649
|
+
style,
|
|
648
650
|
...props
|
|
649
651
|
}) {
|
|
650
652
|
const ref = useRef3(null);
|
|
651
653
|
const isDisabled = disabled || loading;
|
|
654
|
+
const hasAction = Boolean(props.onClick) || type === "submit" || type === "reset" || Boolean(props.href);
|
|
655
|
+
const resolvedCursor = cursor ?? (disabled ? "not-allowed" : loading ? "progress" : hasAction ? "pointer" : "default");
|
|
652
656
|
const resolvedType = type ?? "button";
|
|
653
657
|
const hasVisibleText = typeof children === "string" ? children.trim().length > 0 : Boolean(children);
|
|
654
658
|
const needsAriaName = !hasVisibleText;
|
|
@@ -693,6 +697,7 @@ function Button({
|
|
|
693
697
|
fullWidth && "ods-btn--full",
|
|
694
698
|
className
|
|
695
699
|
),
|
|
700
|
+
style: { cursor: resolvedCursor, ...style },
|
|
696
701
|
"data-loading": loading || void 0,
|
|
697
702
|
whileTap: isDisabled ? void 0 : { scale: 0.97 },
|
|
698
703
|
transition: { duration: 0.1 },
|