mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
refactor: migrate TermsOfServiceLink from MUI to shadcn/ui (#20260)
## Summary Migrate the `TermsOfServiceLink` component from MUI to shadcn/ui ## Changes - **Replaced** `@mui/material/Link` with the custom `Link` component from `components/Link/Link` (shadcn/ui) - **Migrated** Emotion `css` prop to Tailwind utility classes - **Preserved** external link icon functionality (automatically provided by shadcn Link component) 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -68,10 +68,7 @@ export const LoginPageView: FC<LoginPageViewProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
<div>{buildInfo?.version}</div>
|
<div>{buildInfo?.version}</div>
|
||||||
{tosAccepted && (
|
{tosAccepted && (
|
||||||
<TermsOfServiceLink
|
<TermsOfServiceLink url={authMethods?.terms_of_service_url} />
|
||||||
url={authMethods?.terms_of_service_url}
|
|
||||||
css={{ fontSize: 12 }}
|
|
||||||
/>
|
|
||||||
)}
|
)}
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1,27 +1,21 @@
|
|||||||
import Link from "@mui/material/Link";
|
import { Link } from "components/Link/Link";
|
||||||
import { SquareArrowOutUpRightIcon } from "lucide-react";
|
|
||||||
import type { FC } from "react";
|
import type { FC } from "react";
|
||||||
|
|
||||||
interface TermsOfServiceLinkProps {
|
interface TermsOfServiceLinkProps {
|
||||||
className?: string;
|
|
||||||
url?: string;
|
url?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({
|
export const TermsOfServiceLink: FC<TermsOfServiceLinkProps> = ({ url }) => {
|
||||||
className,
|
|
||||||
url,
|
|
||||||
}) => {
|
|
||||||
return (
|
return (
|
||||||
<div css={{ paddingTop: 12, fontSize: 16 }} className={className}>
|
<div className="pt-3 text-base">
|
||||||
By continuing, you agree to the{" "}
|
By continuing, you agree to the{" "}
|
||||||
<Link
|
<Link
|
||||||
css={{ fontWeight: 500, textWrap: "nowrap" }}
|
className="font-medium whitespace-nowrap"
|
||||||
href={url}
|
href={url}
|
||||||
target="_blank"
|
target="_blank"
|
||||||
rel="noreferrer"
|
rel="noreferrer"
|
||||||
>
|
>
|
||||||
Terms of Service
|
Terms of Service
|
||||||
<SquareArrowOutUpRightIcon className="size-icon-xs" />
|
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user