MCPcopy Create free account
hub / github.com/editablejs/editable / CodeStep

Function CodeStep

apps/docs/src/components/mdx/mdx-components.tsx:30–46  ·  view source on GitHub ↗
({ children, step }: { children: any; step: number })

Source from the content-addressed store, hash-verified

28import { useTranslation } from 'react-i18next'
29
30function CodeStep({ children, step }: { children: any; step: number }) {
31 return (
32 <span
33 data-step={step}
34 css={[
35 tw`relative rounded border-b-2 border-opacity-60 bg-opacity-10 px-[6px] py-[1.5px] dark:bg-opacity-20`,
36 step === 1 && tw`bg-blue-40 border-blue-40 text-blue-60 dark:text-blue-30`,
37 step === 2 && tw`bg-yellow-40 border-yellow-40 text-yellow-60 dark:text-yellow-30`,
38 step === 3 && tw`bg-purple-40 border-purple-40 text-purple-60 dark:text-purple-30`,
39 step === 4 && tw`bg-green-40 border-green-40 text-green-60 dark:text-green-30`,
40 ]}
41 className="code-step"
42 >
43 {children}
44 </span>
45 )
46}
47
48const P = (p: JSX.IntrinsicElements['p']) => <p tw="my-4 whitespace-pre-wrap" {...p} />
49

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…