mirror of
https://github.com/callstack/react-native-testing-library.git
synced 2026-09-18 23:09:04 +08:00
3cdfb8561d
* chore: copy Re.pack docs * chore: global configs * docs: migrate getting started * chore: migrate intro * docs: move migration guides * chore: remove some unused things * docs: move API * docs: re-organize docs * docs: re-organize * chore: fix file refs * docs: tweaks and fixes * docs: reorganize docs * chore: replace website * chore: deploy script
44 lines
891 B
TypeScript
44 lines
891 B
TypeScript
import Theme, {
|
|
Link,
|
|
PrevNextPage,
|
|
getCustomMDXComponent,
|
|
} from 'rspress/theme';
|
|
|
|
const Layout = () => <Theme.Layout />;
|
|
|
|
export default {
|
|
...Theme,
|
|
Layout,
|
|
};
|
|
|
|
const { code: Code, pre: Pre } = getCustomMDXComponent();
|
|
|
|
/* expose internal CodeBlock component */
|
|
export const CodeBlock = ({ children, language, title }) => {
|
|
return (
|
|
<Pre>
|
|
<Code
|
|
className={`language-${language}`}
|
|
meta={title ? `title="${title}"` : undefined}
|
|
>
|
|
{children}
|
|
</Code>
|
|
</Pre>
|
|
);
|
|
};
|
|
|
|
const CustomLink = (props) => (
|
|
<Link {...props} className={props.className + ' rspress-link'} />
|
|
);
|
|
|
|
/* omit rendering for edge cases */
|
|
const CustomPrevNextPage = (props) => {
|
|
if (!props.text) return null;
|
|
return <PrevNextPage {...props} />;
|
|
};
|
|
|
|
export { CustomLink as Link };
|
|
export { CustomPrevNextPage as PrevNextPage };
|
|
|
|
export * from 'rspress/theme';
|