mirror of
https://github.com/ente-io/ente.git
synced 2025-08-07 15:09:09 +00:00
Color text
This commit is contained in:
parent
9a01518200
commit
a37bd085d6
@ -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>
|
||||
|
@ -25,6 +25,7 @@ export default function CopyButton({
|
||||
setCopied(true);
|
||||
setTimeout(() => setCopied(false), 1000);
|
||||
};
|
||||
|
||||
return (
|
||||
<Tooltip
|
||||
arrow
|
||||
|
Loading…
x
Reference in New Issue
Block a user