diff --git a/.changeset/clean-coats-kneel.md b/.changeset/clean-coats-kneel.md new file mode 100644 index 000000000..14338ba1d --- /dev/null +++ b/.changeset/clean-coats-kneel.md @@ -0,0 +1,5 @@ +--- +"@cube-dev/ui-kit": patch +--- + +Set `neutral` as the default type for ItemButton. diff --git a/src/components/actions/ItemButton/ItemButton.tsx b/src/components/actions/ItemButton/ItemButton.tsx index 8ab8eac10..f2215bba0 100644 --- a/src/components/actions/ItemButton/ItemButton.tsx +++ b/src/components/actions/ItemButton/ItemButton.tsx @@ -98,7 +98,7 @@ const ItemButton = forwardRef(function ItemButton( to, htmlType, as, - type, + type = 'neutral', theme, onPress, actions, @@ -126,20 +126,6 @@ const ItemButton = forwardRef(function ItemButton( const { hoverProps, isHovered } = useHover({}); - const finalWrapperStyles = useMemo(() => { - return wrapperStyles - ? { - ...wrapperStyles, - ...(wrapperStyles?.Actions - ? { - '& > [data-element="Actions"]': wrapperStyles.Actions, - Actions: undefined, - } - : undefined), - } - : undefined; - }, [wrapperStyles]); - const { actionProps } = useAction( { ...(allProps as any), htmlType, to, as, mods }, ref, @@ -162,7 +148,7 @@ const ItemButton = forwardRef(function ItemButton( {...hoverProps} data-size={size} mods={{ 'actions-hidden': !areActionsShown && showActionsOnHover }} - styles={finalWrapperStyles} + styles={wrapperStyles} style={ { '--actions-width':