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
export async function getStaticProps() { | |
const postDirectory = path.join(process.cwd(), "src/pages/blog"); | |
const postFilenames = fs | |
.readdirSync(postDirectory) | |
.filter((file) => path.extname(file).toLowerCase() === ".mdx"); | |
const postModules = await Promise.all( | |
postFilenames.map(async (p) => require(`./${p}`)) | |
); | |
return { |
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
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
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
// Generated from https://tailwindcss.com/docs/customizing-colors | |
export default { | |
slate: { | |
50: "#f8fafc", | |
100: "#f1f5f9", | |
200: "#e2e8f0", | |
300: "#cbd5e1", | |
400: "#94a3b8", | |
500: "#64748b", | |
600: "#475569", |
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
export const withWebSocket = (Story: FC, { parameters }: StoryContext) => { | |
if (!parameters.webSocket) { | |
console.warn( | |
"Looks like you forgot to add websocket messages to the story", | |
); | |
} | |
// @ts-expect-error -- TS doesn't know about the global WebSocket | |
window.WebSocket = function () { | |
return { |
OlderNewer