Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: fix playground story intro code #2658

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions packages/core/.storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import * as VibeComponents from "../src/components";
import * as VibeComponentsNext from "../src/components/next";
import * as VibeHooks from "../src/hooks";
import * as VibeIcons from "@vibe/icons";
import vibeLogo from "./logo.svg";
import { Preview } from "@storybook/react";
import isChromatic from "chromatic/isChromatic";
import { DocsContainer, DocsPage, Unstyled } from "@storybook/blocks";
Expand Down Expand Up @@ -119,7 +118,6 @@ const preview: Preview = {
playground: {
storyId: "playground",
components: {
vibeLogo,
...VibeComponents,
VibeIcons,
VibeNext: VibeComponentsNext,
Expand Down
3 changes: 1 addition & 2 deletions packages/core/.storybook/theme.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { create } from "@storybook/theming/create";
import logo from "./logo.svg";

export default create({
base: "light",
brandImage: logo,
brandImage: "/logo.svg",
brandUrl: "https://vibe.monday.com",
barSelectedColor: "#5034ff",
brandTitle: "Vibe Design System",
Expand Down
3 changes: 1 addition & 2 deletions packages/core/.storybook/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"extends": "../tsconfig.base.json",
"compilerOptions": {
"resolveJsonModule": true,
"types": ["./types.ts"]
"resolveJsonModule": true
},
"include": ["**/*.ts", "**/*.tsx", "**/*.json"]
}
4 changes: 0 additions & 4 deletions packages/core/.storybook/types.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,31 @@ export const jsx = `() => {
}

return (
<Flex direction="column" gap={40} className="playground">
<img src={vibeLogo} alt="Vibe Logo" className="vibe-logo" />
<section>
<Heading type="h3" align="center" color="secondary">
<Flex direction="column" className="playground">
<img
src="https://vibe.monday.com/logo.svg"
alt="Vibe Logo"
className="vibe-logo"
/>
<Flex direction="column" align="center" justify="center" gap="xs">
<Heading type="h3" align="center">
Playground
</Heading>
<Text type="text2" color="secondary" ellipsis={false}>
<Text type="text2" ellipsis={false}>
Craft, Experiment, and Innovate with Vibe.
</Text>
</section>
<Flex direction="column" align="center" justify="center" gap="small">
<Button kind="secondary" size="small" onClick={onButtonClick}>
Clicked {timesClicked} time{timesClicked === 1 ? "" : "s"}
</Button>
<Text type="text3" color="secondary" ellipsis={false}>
Tip: Can't see the editor? Click 'D' on your keyboard
</Text>
</Flex>
<Button
kind="secondary"
size="small"
onClick={onButtonClick}
className="count-button"
>
Clicked {timesClicked} time{timesClicked === 1 ? "" : "s"}
</Button>
<Text type="text3" ellipsis={false} color="secondary">
Can't see the editor? Click 'D' on your keyboard
</Text>
</Flex>
);
}`;
Expand All @@ -36,13 +43,18 @@ export const css = `.playground {

.vibe-logo {
width: 150px;
margin-block-end: var(--spacing-large);
transition: transform 0.3s ease, filter 0.3s ease;
}

.vibe-logo:hover {
transform: scale(1.02);
filter: drop-shadow(0 0 32px rgba(80, 52, 255, 0.3));
}

.count-button {
margin-block: var(--spacing-medium);
}
`;

export default { jsx, css };
Loading