-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'feat/aws' of github.com:coingaming/moon-light into feat…
…/aws
- Loading branch information
Showing
13 changed files
with
177 additions
and
115 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,33 @@ | ||
import { MDXRemote, MDXRemoteProps } from "next-mdx-remote/rsc"; | ||
import { ReactNode, ComponentProps, HTMLProps } from "react"; | ||
|
||
const defaultComponents: ComponentProps<any> = { | ||
a: (props: HTMLProps<HTMLAnchorElement>) => ( | ||
<a {...props} className="transition-colors underline hover:text-piccolo"> | ||
{props.children} | ||
</a> | ||
), | ||
strong: (props: HTMLProps<HTMLSpanElement>) => ( | ||
<span {...props} className="font-medium"> | ||
{props.children} | ||
</span> | ||
), | ||
ul: (props: HTMLProps<HTMLUListElement>) => ( | ||
<ul {...props} className="list-disc ps-8"> | ||
{props.children} | ||
</ul> | ||
), | ||
}; | ||
|
||
export function MDX({ | ||
markdown, | ||
...rest | ||
}: { markdown: string } & Omit<MDXRemoteProps, "source">) { | ||
return <MDXRemote {...rest} source={markdown} />; | ||
return ( | ||
<MDXRemote | ||
{...rest} | ||
source={markdown} | ||
components={rest.components || defaultComponents} | ||
/> | ||
); | ||
} |
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
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
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
// Playwright constants | ||
export * from "./playwright"; | ||
// Themes | ||
export * from "./themes"; |
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,64 @@ | ||
import type { Themes } from "@/types"; | ||
|
||
export const themes: Themes = { | ||
betadda: { | ||
dark: "theme-betadda-dark", | ||
light: "theme-betadda-light", | ||
}, | ||
bitcasino: { | ||
dark: "theme-bitcasino-dark", | ||
light: "theme-bitcasino-light", | ||
}, | ||
bombay: { | ||
dark: "theme-bombay-club", | ||
light: "theme-bombay-club", | ||
}, | ||
// comms: { | ||
// dark: 'theme-comms-dark', | ||
// light: 'theme-comms-light', | ||
// }, | ||
empire: { | ||
dark: "theme-empire-dark", | ||
light: "theme-empire-light", | ||
}, | ||
hub88: { | ||
dark: "theme-hub88-light", | ||
light: "theme-hub88-light", | ||
}, | ||
lab: { | ||
dark: "theme-lab-light", | ||
light: "theme-lab-light", | ||
}, | ||
livecasino: { | ||
dark: "theme-livecasino-dark", | ||
light: "theme-livecasino-light", | ||
}, | ||
moonDesign: { | ||
dark: "theme-moon-dark", | ||
light: "theme-moon-light", | ||
}, | ||
partners: { | ||
dark: "theme-partners-light", | ||
light: "theme-partners-light", | ||
}, | ||
sportsbet: { | ||
dark: "theme-sb-dark", | ||
light: "theme-sb-light", | ||
}, | ||
tradeart: { | ||
dark: "theme-tradeart-dark", | ||
light: "theme-tradeart-light", | ||
}, | ||
tradeartMiniBetting: { | ||
dark: "theme-tradeart-mini-betting", | ||
light: "theme-tradeart-mini-betting", | ||
}, | ||
travel: { | ||
dark: "theme-travel-light", | ||
light: "theme-travel-light", | ||
}, | ||
pay: { | ||
dark: "theme-pay-light", | ||
light: "theme-pay-light", | ||
}, | ||
} as const; |
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
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
export { type PropsTableProp, type PropsTablePropTypes } from "./propsTable"; | ||
export { type NonEmptyArray } from "./utils"; | ||
export type { PropsTableProp, PropsTablePropTypes } from "./propsTable"; | ||
export type { NonEmptyArray } from "./utils"; | ||
export type { ThemeColorModes, Themes } from "./theme"; |
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,23 @@ | ||
export type ThemeColorModes = { | ||
dark: string; | ||
light: string; | ||
}; | ||
|
||
export type Themes = { | ||
moonDesign: ThemeColorModes; | ||
betadda: ThemeColorModes; | ||
bitcasino: ThemeColorModes; | ||
bombay: ThemeColorModes; | ||
// TODO don't need comms | ||
// comms: ThemeColorModes; | ||
empire: ThemeColorModes; | ||
hub88: ThemeColorModes; | ||
lab: ThemeColorModes; | ||
livecasino: ThemeColorModes; | ||
partners: ThemeColorModes; | ||
sportsbet: ThemeColorModes; | ||
tradeart: ThemeColorModes; | ||
tradeartMiniBetting: ThemeColorModes; | ||
travel: ThemeColorModes; | ||
pay: ThemeColorModes; | ||
}; |
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