mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 18:58:26 +00:00
switch the playground repo button to ty repo (#18228)
Co-authored-by: Micha Reiser <micha@reiser.io>
This commit is contained in:
parent
d098118e37
commit
7b253100f8
4 changed files with 8 additions and 13 deletions
|
@ -87,7 +87,7 @@ export default function Chrome() {
|
|||
<Header
|
||||
edit={revision}
|
||||
theme={theme}
|
||||
logo="ruff"
|
||||
tool="ruff"
|
||||
version={ruffVersion}
|
||||
onChangeTheme={setTheme}
|
||||
onShare={handleShare}
|
||||
|
|
|
@ -9,7 +9,7 @@ import AstralButton from "./AstralButton";
|
|||
export default function Header({
|
||||
edit,
|
||||
theme,
|
||||
logo,
|
||||
tool,
|
||||
version,
|
||||
onChangeTheme,
|
||||
onReset,
|
||||
|
@ -17,7 +17,7 @@ export default function Header({
|
|||
}: {
|
||||
edit: number | null;
|
||||
theme: Theme;
|
||||
logo: "ruff" | "ty";
|
||||
tool: "ruff" | "ty";
|
||||
version: string | null;
|
||||
onChangeTheme: (theme: Theme) => void;
|
||||
onReset?(): void;
|
||||
|
@ -37,7 +37,7 @@ export default function Header({
|
|||
"
|
||||
>
|
||||
<div className="py-4 pl-2">
|
||||
<Logo name={logo} className="fill-galaxy dark:fill-radiate" />
|
||||
<Logo name={tool} className="fill-galaxy dark:fill-radiate" />
|
||||
</div>
|
||||
<div className="flex items-center min-w-0 gap-4 mx-2">
|
||||
{version ? (
|
||||
|
@ -46,7 +46,7 @@ export default function Header({
|
|||
</div>
|
||||
) : null}
|
||||
<Divider />
|
||||
<RepoButton />
|
||||
<RepoButton href={`https://github.com/astral-sh/${tool}`} />
|
||||
<Divider />
|
||||
<div className="max-sm:hidden flex">
|
||||
<ResetButton onClicked={onReset} />
|
||||
|
|
|
@ -1,11 +1,6 @@
|
|||
export default function RepoButton() {
|
||||
export default function RepoButton({ href }: { href: string }) {
|
||||
return (
|
||||
<a
|
||||
className="rounded-full"
|
||||
href="https://github.com/astral-sh/ruff"
|
||||
target="_blank"
|
||||
rel="noreferrer"
|
||||
>
|
||||
<a className="rounded-full" href={href} target="_blank" rel="noreferrer">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
width="24"
|
||||
|
|
|
@ -156,7 +156,7 @@ export default function Playground() {
|
|||
<Header
|
||||
edit={files.revision}
|
||||
theme={theme}
|
||||
logo="ty"
|
||||
tool="ty"
|
||||
version={version}
|
||||
onChangeTheme={setTheme}
|
||||
onShare={handleShare}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue