Skip to content

Commit 2627d51

Browse files
committed
[playground] Use cursor for clickable elements
1 parent cc3ddaf commit 2627d51

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.github/workflows/publish-knot-playground.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Publish the Red Knot playground.
2-
name: "[Playground] Release"
2+
name: "[Knot Playground] Release"
33

44
permissions: {}
55

playground/api/src/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,7 @@ export default {
4040
const { DEV, PLAYGROUND } = env;
4141

4242
const headers = DEV ? DEVELOPMENT_HEADERS : PRODUCTION_HEADERS;
43-
44-
if (!DEV && request.url.startsWith("https://playknot.ruff.rs")) {
43+
if (!DEV && request.headers.get("origin") === "https://playknot.ruff.rs") {
4544
headers["Access-Control-Allow-Origin"] = "https://playknot.ruff.rs";
4645
}
4746

playground/knot/src/Editor/Files.tsx

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ export function Files({
6464
<button
6565
disabled={lastFile}
6666
onClick={lastFile ? undefined : () => onRemove(id)}
67-
className={"inline-block disabled:opacity-50"}
67+
className={"inline-block disabled:opacity-50 cursor-pointer"}
6868
title="Close file"
6969
>
7070
<span className="sr-only">Close</span>
@@ -73,7 +73,11 @@ export function Files({
7373
</ListItem>
7474
))}
7575
<ListItem selected={false} theme={theme}>
76-
<button onClick={handleAdd} title="Add file" className="inline-block">
76+
<button
77+
onClick={handleAdd}
78+
title="Add file"
79+
className="inline-block cursor-pointer"
80+
>
7781
<span className="sr-only">Add file</span>
7882
<Icons.Add />
7983
</button>
@@ -143,7 +147,7 @@ function FileEntry({ name, onClicked, onRenamed, selected }: FileEntryProps) {
143147
onClicked();
144148
}
145149
}}
146-
className="flex gap-2 items-center py-4"
150+
className="flex gap-2 items-center py-4 cursor-pointer"
147151
>
148152
<span className="inline-block flex-none" aria-hidden>
149153
<Icons.Python width={12} height={12} />

playground/shared/src/AstralButton.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ export default function AstralButton({
1818
"text-black",
1919
"hover:text-white",
2020
"hover:bg-galaxy",
21+
"cursor-pointer",
2122
"outline-1",
2223
"dark:outline",
2324
"dark:hover:outline-white",

playground/shared/src/SideBar.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export function SideBarEntry({
4040
aria-label={title}
4141
onClick={onClick}
4242
role="button"
43-
className={`group py-4 px-2 relative flex items-center justify-center flex-col fill-white text-white ${
43+
className={`group py-4 px-2 relative flex items-center justify-center flex-col fill-white text-white cursor-pointer ${
4444
selected ? "opacity-100" : "opacity-50 hover:opacity-100"
4545
}`}
4646
>

0 commit comments

Comments
 (0)