-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from syfxlin/develop
fix(style): Fix some styles
- Loading branch information
Showing
6 changed files
with
50 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
"use client"; | ||
import React, { ReactNode } from "react"; | ||
import { usePathname } from "next/navigation"; | ||
import { cx } from "@syfxlin/reve"; | ||
import { LinkButton } from "../../ui/button"; | ||
import { t } from "../../../locales"; | ||
import * as styles from "./styles.css"; | ||
|
||
export interface BackProps { | ||
icon: ReactNode; | ||
} | ||
|
||
export const Back: React.FC<BackProps> = ({ icon }) => { | ||
const path = usePathname(); | ||
if (path !== "/") { | ||
return ( | ||
<LinkButton tooltip aria-label={t("header.home")} href="/" className={cx(styles.view_elastic_icon, styles.back)}> | ||
<span>{t("header.home")}</span> | ||
{icon} | ||
</LinkButton> | ||
); | ||
} else { | ||
return null; | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters