Skip to content

Commit c7ecd57

Browse files
committed
fix: Fix token state selector (#4955)
## Description Select the state, see it stays selected ## Steps for reproduction 1. click button 2. expect xyz ## Code Review - [ ] hi @kof, I need you to do - conceptual review (architecture, feature-correctness) - detailed review (read every line) - test it on preview ## Before requesting a review - [ ] made a self-review - [ ] added inline comments where things may be not obvious (the "why", not "what") ## Before merging - [ ] tested locally and on preview environment (preview dev login: 0000) - [ ] updated [test cases](https://github.com/webstudio-is/webstudio/blob/main/apps/builder/docs/test-cases.md) document - [ ] added tests - [ ] if any new env variables are added, added them to `.env` file
1 parent 52f1d0b commit c7ecd57

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

apps/builder/app/builder/features/style-panel/style-source/style-source-control.tsx

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,12 @@ const StyleSourceButton = styled("button", {
215215
},
216216
false: {},
217217
},
218+
bleed: {
219+
true: {
220+
position: "absolute",
221+
inset: 0,
222+
},
223+
},
218224
},
219225
});
220226

@@ -318,14 +324,15 @@ export const StyleSourceControl = ({
318324
disabled={disabled}
319325
aria-current={selected && state === undefined}
320326
role="button"
321-
onClick={onSelect}
322327
hasError={error !== undefined}
323328
>
324329
<Flex grow css={{ padding: theme.spacing[2] }}>
325330
<StyleSourceButton
326331
disabled={disabled || isEditing}
327332
isEditing={isEditing}
328333
tabIndex={-1}
334+
onClick={onSelect}
335+
bleed={source === "local"}
329336
>
330337
<Flex align="center" justify="center" gap="1">
331338
{source === "local" ? (

0 commit comments

Comments
 (0)