forked from ZcashFoundation/zebra
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GFM support, update markdown deps, prepare for markdown polls (Zc…
- Loading branch information
Showing
14 changed files
with
15,365 additions
and
8,703 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,44 @@ | ||
import React, { forwardRef } from 'react'; | ||
import { TableBody, TableBodyProps, TableCell, TableCellProps, TableRow, TableRowProps } from '@mui/material'; | ||
import { ReactNode } from 'react'; | ||
|
||
interface CustomTableRowProps extends TableRowProps { | ||
children: ReactNode; | ||
node: any; // Adjust the type based on your specific needs | ||
darkMode: boolean; | ||
} | ||
|
||
export const CustomTableRow = forwardRef<HTMLTableRowElement, CustomTableRowProps>(({ children, node, darkMode, ...otherProps }, ref) => { | ||
const isOdd = Number(node?.position?.start.line) % 2 === 0; | ||
|
||
return ( | ||
<TableRow | ||
component="tr" | ||
sx={{ | ||
backgroundColor: (theme) => { | ||
let gray = "#f5f5f5"; | ||
if (darkMode) { | ||
gray = "#000000"; | ||
} | ||
return isOdd ? "inherit" : gray; | ||
}, | ||
}} | ||
ref={ref} | ||
{...otherProps} | ||
> | ||
{children} | ||
</TableRow> | ||
); | ||
}); | ||
|
||
interface CustomTableBodyProps extends TableBodyProps { | ||
children: ReactNode; | ||
} | ||
|
||
export const CustomTableBody = forwardRef<HTMLTableSectionElement, CustomTableBodyProps>((props, ref) => { | ||
return ( | ||
<TableBody component="tbody" ref={ref} {...props}> | ||
{props.children} | ||
</TableBody> | ||
); | ||
}); |
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,19 @@ | ||
import React from 'react'; | ||
import { Link, LinkProps } from '@mui/material'; | ||
|
||
type MLinkProps = Omit<LinkProps, 'color'> & Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, 'color'>; | ||
|
||
const MLink: React.FC<MLinkProps> = ({ href, ...props }) => { | ||
const isInternalLink = href?.startsWith('#'); | ||
|
||
return ( | ||
<Link | ||
href={href} | ||
target={isInternalLink ? undefined : '_blank'} | ||
rel={isInternalLink ? undefined : 'noopener noreferrer'} | ||
{...props} | ||
/> | ||
); | ||
}; | ||
|
||
export default MLink; |
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 |
---|---|---|
|
@@ -358,4 +358,8 @@ pre { | |
display: block; | ||
margin: auto; | ||
padding: 0.5em; | ||
} | ||
|
||
mjx-container { | ||
overflow: scroll; | ||
} |
Oops, something went wrong.