mirror of
https://github.com/outline/outline.git
synced 2026-11-28 00:09:58 +03:00
- Applied types-react-codemod implicit-children transform - Updated 63 components to use React.PropsWithChildren - Fixed React.FC types to be compatible with React 18 - Ensures proper typing for components that accept children props This addresses React 18's removal of implicit children from component props.
22 lines
461 B
TypeScript
22 lines
461 B
TypeScript
import * as React from "react";
|
|
|
|
const style: React.CSSProperties = {
|
|
fontFamily: "monospace",
|
|
fontSize: "20px",
|
|
display: "inline-block",
|
|
padding: "10px 20px",
|
|
color: "#111319",
|
|
background: "#F9FBFC",
|
|
fontWeight: "500",
|
|
borderRadius: "2px",
|
|
letterSpacing: "0.1em",
|
|
};
|
|
|
|
const CopyableCode: React.FC<React.PropsWithChildren<unknown>> = (props) => (
|
|
<pre {...props} style={style}>
|
|
{props.children}
|
|
</pre>
|
|
);
|
|
|
|
export default CopyableCode;
|