Skip to content

Commit 22f95bb

Browse files
🐛 fix docs indentation
1 parent 5b4beb8 commit 22f95bb

File tree

2 files changed

+9
-14
lines changed

2 files changed

+9
-14
lines changed

packages/react/README.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ interface ButtonProps {
104104
const SomeButton = cm.button<ButtonProps>`
105105
text-lg
106106
mt-5
107-
${(
108-
p,
109-
) => (p.$isActive ? "bg-blue-400 text-white" : "bg-blue-400 text-blue-200")}
110-
${(p) => (p.$isLoading ? "opacity-90 pointer-events-none" : "")}
107+
${({ $isActive }) => ($isActive ? "bg-blue-400 text-white" : "bg-blue-400 text-blue-200")}
108+
${({ $isLoading }) => ($isLoading ? "opacity-90 pointer-events-none" : "")}
111109
`;
112110
// transforms to <button className="text-lg mt-5 bg-blue-400 text-white opacity-90 pointer-events-none" />
113111
```

packages/solid/README.md

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,8 @@ interface ButtonProps {
104104
const SomeButton = cm.button<ButtonProps>`
105105
text-lg
106106
mt-5
107-
${(
108-
p,
109-
) => (p.$isActive ? "bg-blue-400 text-white" : "bg-blue-400 text-blue-200")}
110-
${(p) => (p.$isLoading ? "opacity-90 pointer-events-none" : "")}
107+
${({ $isActive }) => ($isActive ? "bg-blue-400 text-white" : "bg-blue-400 text-blue-200")}
108+
${({ $isLoading }) => ($isLoading ? "opacity-90 pointer-events-none" : "")}
111109
`;
112110
// transforms to <button className="text-lg mt-5 bg-blue-400 text-white opacity-90 pointer-events-none" />
113111
```
@@ -135,17 +133,16 @@ const Alert = cm.div.variants<AlertProps>({
135133
// optional
136134
base: (p) => `
137135
${p.isActive ? "custom-active" : "custom-inactive"}
138-
p-4
139-
rounded-md
136+
p-4 rounded-md
140137
`,
141138
// required
142139
variants: {
143140
$severity: {
144141
warning: "bg-yellow-100 text-yellow-800",
145-
info: (p) =>
146-
`bg-blue-100 text-blue-800 ${p.$isActive ? "shadow-lg" : ""}`,
147-
error: (p) =>
148-
`bg-red-100 text-red-800 ${p.$isActive ? "ring ring-red-500" : ""}`,
142+
info: ({ $isActive }) =>
143+
`bg-blue-100 text-blue-800 ${ $isActive ? "shadow-lg" : ""}`,
144+
error: ({ $isActive }) =>
145+
`bg-red-100 text-red-800 ${ $isActive ? "ring ring-red-500" : ""}`,
149146
},
150147
},
151148
// optional - used if no variant was found

0 commit comments

Comments
 (0)