Color text

This commit is contained in:
Manav Rathi 2025-01-17 20:02:22 +05:30
parent 9a01518200
commit a37bd085d6
No known key found for this signature in database
2 changed files with 7 additions and 3 deletions

View File

@ -1,7 +1,7 @@
import { CenteredFlex } from "@/base/components/containers";
import { ActivityIndicator } from "@/base/components/mui/ActivityIndicator";
import CopyButton from "@ente/shared/components/CopyButton";
import { Box } from "@mui/material";
import { Box, Typography } from "@mui/material";
import React from "react";
interface CodeBlockProps {
@ -34,14 +34,17 @@ export const CodeBlock: React.FC<CodeBlockProps> = ({ code }) => {
borderRadius: 1,
}}
>
<Box
<Typography
sx={{
padding: "16px 36px 16px 16px",
wordBreak: "break-word",
color: "accent.contrastText",
// Increase the line height from the body default.
lineHeight: 1.5,
}}
>
{code}
</Box>
</Typography>
<Box sx={{ position: "absolute", top: 0, right: 0, mt: 1 }}>
<CopyButton code={code} />
</Box>

View File

@ -25,6 +25,7 @@ export default function CopyButton({
setCopied(true);
setTimeout(() => setCopied(false), 1000);
};
return (
<Tooltip
arrow