Open source website builder and Webflow alternative. Webstudio is an advanced visual builder that connects to any headless CMS, supports all CSS properties, and can be hosted anywhere, including with us.
TypeScript accessibilityalternativecloudflarecloudflare-workersdesignfreefrontendopen-sourceradix-uireactremixweb-developmentwebflowwebsite-builderwebsite-developmentwebsiteswebstudio
fix: Fix binding button covering too much of the control (#3195)
Oleg Isonen82b544be485d
diff --git a/apps/builder/app/builder/shared/binding-popover.tsx b/apps/builder/app/builder/shared/binding-popover.tsxindex cfda56f370..ec59a65aff 100644--- a/apps/builder/app/builder/shared/binding-popover.tsx+++ b/apps/builder/app/builder/shared/binding-popover.tsx@@ -257,6 +257,7 @@ const BindingButton = forwardRef<<SmallIconButtonref={ref}data-variant={variant}+ bleed={false}css={{// hide by defaultopacity: `var(${bindingOpacityProperty}, 0)`,diff --git a/packages/design-system/src/components/primitives/small-button.tsx b/packages/design-system/src/components/primitives/small-button.tsxindex eecb5c8868..d9abdd1901 100644--- a/packages/design-system/src/components/primitives/small-button.tsx+++ b/packages/design-system/src/components/primitives/small-button.tsx@@ -60,12 +60,6 @@ const style = css({width: theme.spacing[9],height: theme.spacing[9],position: "relative",- // We want to bleed outside of the 16px icon size because its too small- "&::after": {- content: '""',- position: "absolute",- inset: `-${theme.spacing[4]}`,- },"&:disabled, &[data-disabled]": {color: theme.colors.foregroundDisabled,},@@ -75,15 +69,27 @@ const style = css({contrast: perVariantStyle("contrast"),destructive: perVariantStyle("destructive"),},+ bleed: {+ true: {+ // We want to bleed outside of the 16px icon size because its too small+ "&::after": {+ content: '""',+ position: "absolute",+ inset: `-${theme.spacing[4]}`,+ },+ },+ },},defaultVariants: {variant: "normal",+ bleed: true,},});type Props = {children: ReactNode;variant?: (typeof smallButtonVariants)[number];+ bleed?: boolean;"data-state"?: (typeof smallButtonStates)[number];"data-focused"?: boolean;css?: CSS;@@ -91,13 +97,13 @@ type Props = {export const SmallButton = forwardRef((- { variant, children, css, className, ...restProps }: Props,+ { variant, children, css, className, bleed, ...restProps }: Props,ref: Ref<HTMLButtonElement>) => {return (<button{...restProps}- className={style({ css, className, variant })}+ className={style({ css, className, variant, bleed })}ref={ref}>{children}