mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-30 13:51:37 +00:00
[playground] Use cursor for clickable elements (#16833)
This commit is contained in:
parent
cc3ddaf070
commit
a9f5dddbaa
5 changed files with 11 additions and 7 deletions
|
@ -1,5 +1,5 @@
|
||||||
# Publish the Red Knot playground.
|
# Publish the Red Knot playground.
|
||||||
name: "[Playground] Release"
|
name: "[Knot Playground] Release"
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
|
|
|
@ -40,8 +40,7 @@ export default {
|
||||||
const { DEV, PLAYGROUND } = env;
|
const { DEV, PLAYGROUND } = env;
|
||||||
|
|
||||||
const headers = DEV ? DEVELOPMENT_HEADERS : PRODUCTION_HEADERS;
|
const headers = DEV ? DEVELOPMENT_HEADERS : PRODUCTION_HEADERS;
|
||||||
|
if (!DEV && request.headers.get("origin") === "https://playknot.ruff.rs") {
|
||||||
if (!DEV && request.url.startsWith("https://playknot.ruff.rs")) {
|
|
||||||
headers["Access-Control-Allow-Origin"] = "https://playknot.ruff.rs";
|
headers["Access-Control-Allow-Origin"] = "https://playknot.ruff.rs";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ export function Files({
|
||||||
<button
|
<button
|
||||||
disabled={lastFile}
|
disabled={lastFile}
|
||||||
onClick={lastFile ? undefined : () => onRemove(id)}
|
onClick={lastFile ? undefined : () => onRemove(id)}
|
||||||
className={"inline-block disabled:opacity-50"}
|
className={"inline-block disabled:opacity-50 cursor-pointer"}
|
||||||
title="Close file"
|
title="Close file"
|
||||||
>
|
>
|
||||||
<span className="sr-only">Close</span>
|
<span className="sr-only">Close</span>
|
||||||
|
@ -73,7 +73,11 @@ export function Files({
|
||||||
</ListItem>
|
</ListItem>
|
||||||
))}
|
))}
|
||||||
<ListItem selected={false} theme={theme}>
|
<ListItem selected={false} theme={theme}>
|
||||||
<button onClick={handleAdd} title="Add file" className="inline-block">
|
<button
|
||||||
|
onClick={handleAdd}
|
||||||
|
title="Add file"
|
||||||
|
className="inline-block cursor-pointer"
|
||||||
|
>
|
||||||
<span className="sr-only">Add file</span>
|
<span className="sr-only">Add file</span>
|
||||||
<Icons.Add />
|
<Icons.Add />
|
||||||
</button>
|
</button>
|
||||||
|
@ -143,7 +147,7 @@ function FileEntry({ name, onClicked, onRenamed, selected }: FileEntryProps) {
|
||||||
onClicked();
|
onClicked();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
className="flex gap-2 items-center py-4"
|
className="flex gap-2 items-center py-4 cursor-pointer"
|
||||||
>
|
>
|
||||||
<span className="inline-block flex-none" aria-hidden>
|
<span className="inline-block flex-none" aria-hidden>
|
||||||
<Icons.Python width={12} height={12} />
|
<Icons.Python width={12} height={12} />
|
||||||
|
|
|
@ -18,6 +18,7 @@ export default function AstralButton({
|
||||||
"text-black",
|
"text-black",
|
||||||
"hover:text-white",
|
"hover:text-white",
|
||||||
"hover:bg-galaxy",
|
"hover:bg-galaxy",
|
||||||
|
"cursor-pointer",
|
||||||
"outline-1",
|
"outline-1",
|
||||||
"dark:outline",
|
"dark:outline",
|
||||||
"dark:hover:outline-white",
|
"dark:hover:outline-white",
|
||||||
|
|
|
@ -40,7 +40,7 @@ export function SideBarEntry({
|
||||||
aria-label={title}
|
aria-label={title}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
role="button"
|
role="button"
|
||||||
className={`group py-4 px-2 relative flex items-center justify-center flex-col fill-white text-white ${
|
className={`group py-4 px-2 relative flex items-center justify-center flex-col fill-white text-white cursor-pointer ${
|
||||||
selected ? "opacity-100" : "opacity-50 hover:opacity-100"
|
selected ? "opacity-100" : "opacity-50 hover:opacity-100"
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue