Skip to content

Commit e3f4a12

Browse files
committed
docs(copy-css-config): simplify component
1 parent 23d4117 commit e3f4a12

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

apps/website/src/components/copy-css-config/copy-css-config.tsx

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { $, component$, useSignal } from '@builder.io/qwik';
1+
import { component$, useSignal } from '@builder.io/qwik';
22
import { Modal, ModalContent, ModalHeader } from '@qwik-ui/headless';
33
import { Button } from '@qwik-ui/styled';
44
import { extractThemeCSS } from '@qwik-ui/utils';
@@ -13,23 +13,17 @@ export default component$(() => {
1313

1414
const { theme } = useTheme();
1515

16-
const generateCSSThemeOutput = $(async () => {
17-
console.log('theme', theme);
18-
const cssRules = extractThemeCSS(
19-
theme === 'dark' || theme === 'light'
20-
? 'border-radius-0 simple primary-cyan-600 light base-slate'
21-
: theme,
22-
globalCSS,
23-
);
24-
cssThemeOutput.value = cssRules;
25-
});
26-
2716
return (
2817
<>
2918
<Button
3019
onClick$={() => {
3120
showSig.value = true;
32-
generateCSSThemeOutput();
21+
cssThemeOutput.value = extractThemeCSS(
22+
theme === 'dark' || theme === 'light'
23+
? 'border-radius-0 simple primary-cyan-600 light base-slate'
24+
: theme,
25+
globalCSS,
26+
);
3327
}}
3428
>
3529
Copy code

0 commit comments

Comments
 (0)