Skip to content

Commit

Permalink
Refactor selection system to support DOM elements
Browse files Browse the repository at this point in the history
adeira-source-id: a262fa6e97f3efbc989f13532ed18ee73031f35d
  • Loading branch information
itsdouges authored and triplex-bot committed Dec 22, 2024
1 parent 977bb34 commit 79afad6
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/gold-rice-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"triplex-vsce": patch
---

Prop labels are now ellipsified when there isn't enough room.
2 changes: 1 addition & 1 deletion examples/test-fixture/src/component-roots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export function ReactRoot() {
}

export function ReactRootFromAnotherModule() {
return <Button />;
return <Button text="Button"/>;
}

export function Unknown() {
Expand Down
22 changes: 20 additions & 2 deletions examples/test-fixture/src/react-roots.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,26 @@
*/
import { Canvas } from "@react-three/fiber";

export function Button() {
return <button>Hello World</button>;
export function Button({
text,
type = "button",
variant = 'default',
}: {
text: string;
type?: "submit" | "button";
variant?: "default" | "primary";
}) {
return (
<button
style={{
background: variant === "primary" ? "blue" : "gray",
color: variant === "primary" ? "white" : "black",
}}
type={type}
>
{text}
</button>
);
}

export function CanvasExample() {
Expand Down

0 comments on commit 79afad6

Please sign in to comment.