Skip to content

Commit

Permalink
docs: Replace tip alpha warning deprecated warning with vibe storyboo…
Browse files Browse the repository at this point in the history
…k components (#1628)
  • Loading branch information
talkor authored Oct 15, 2023
1 parent 0953292 commit fdae6a1
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 131 deletions.
3 changes: 2 additions & 1 deletion .storybook/preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { addParameters } from "@storybook/react";
import { DocsContainer, DocsPage } from "@storybook/addon-docs";
import { withPerformance } from "storybook-addon-performance";
import "monday-ui-style/dist/index.min.css";
import { ComponentNameDecorator, RelatedComponentsDecorator, Tip } from "../src/storybook";
import { ComponentNameDecorator, RelatedComponentsDecorator } from "../src/storybook";
import {
AnchorListItem,
ComponentRules,
Expand All @@ -14,6 +14,7 @@ import {
MultipleStoryElementsWrapper,
Paragraph,
SectionName,
Tip,
Title,
UnstyledList,
UnstyledListItem,
Expand Down
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"react-window": "^1.8.7",
"react-windowed-select": "^2.0.4",
"style-inject": "^0.3.0",
"vibe-storybook-components": "^0.8.0"
"vibe-storybook-components": "^0.9.0"
},
"devDependencies": {
"@babel/core": "^7.16.5",
Expand Down
12 changes: 2 additions & 10 deletions scripts/build-utils.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
#!/usr/bin/env node
const fs = require("fs");
const path = require("path");
const {
publishedTSComponents,
publishedJSComponents,
publishedStorybookComponents
} = require("../webpack/published-components");
const { publishedTSComponents, publishedJSComponents } = require("../webpack/published-components");

function createFoldersIfNotExist() {
// if dist is not exist let's create it
Expand Down Expand Up @@ -52,11 +48,7 @@ function buildComponentsTypesIndexFile() {

function buildStorybookComponentsIndexFile() {
const imports = ["import 'vibe-storybook-components/index.css';"];
const exports = Object.entries(publishedStorybookComponents).map(([name, _path]) => {
const fileName = name.split("/").slice(-1);
return buildComponentExport(fileName, `./${fileName}`);
});
exports.push("export * from 'vibe-storybook-components'");
const exports = ["export * from 'vibe-storybook-components'"];
convertExportsToFile(imports.concat(exports), "storybook/index.js");
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Heading from "../LegacyHeading";
import { ArgsTable, Canvas, Meta, Story } from "@storybook/addon-docs";
import { createStoryMetaSettingsDecorator, DeprecatedWarning } from "../../../storybook";
import { createComponentTemplate, Link } from "vibe-storybook-components";
import { createStoryMetaSettingsDecorator } from "../../../storybook";
import { createComponentTemplate, DeprecatedWarning, Link } from "vibe-storybook-components";
import Divider from "../../Divider/Divider";
import Search from "../../Search/Search";
import Checkbox from "../../Checkbox/Checkbox";
Expand Down
11 changes: 0 additions & 11 deletions src/storybook/components/alpha-warning/alpha-warning.tsx

This file was deleted.

22 changes: 0 additions & 22 deletions src/storybook/components/deprecated-warning/deprecated-warning.tsx

This file was deleted.

5 changes: 1 addition & 4 deletions src/storybook/components/index.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
import { ComponentNameDecorator } from "./component-name/component-name-decorator";
import { Tip } from "./tip/tip";
import { AlphaWarning } from "./alpha-warning/alpha-warning";
import { DeprecatedWarning } from "./deprecated-warning/deprecated-warning";
import { RelatedComponentsDecorator } from "./related-components/related-components-decorator";
import { ComingSoon } from "./coming-soon/coming-soon";

export { AlphaWarning, Tip, ComponentNameDecorator, RelatedComponentsDecorator, ComingSoon, DeprecatedWarning };
export { ComponentNameDecorator, RelatedComponentsDecorator, ComingSoon };
18 changes: 0 additions & 18 deletions src/storybook/components/tip/README.md

This file was deleted.

36 changes: 0 additions & 36 deletions src/storybook/components/tip/tip.jsx

This file was deleted.

4 changes: 0 additions & 4 deletions src/storybook/components/tip/tip.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
import { Meta } from "@storybook/addon-docs";
import { Frame, Link } from "vibe-storybook-components";
import { Frame, Link, AlphaWarning } from "vibe-storybook-components";
import { TextStyles } from "./text-styles/text-styles";
import TextColors from "../colors/text-colors/text-colors";
import { COLORS, SHADOW, SPACING } from "../../components/related-components/component-description-map";
import { typographyExample1, typographyExample2 } from "./assets";
import { AlphaWarning } from "../../components/alpha-warning/alpha-warning";
import "./typography.scss";

<Meta title="Foundations/Typography" />
Expand Down
4 changes: 1 addition & 3 deletions webpack/published-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ const path = require("path");
const { exposeIcons } = require("../src/utils/icon-utils");
const { publishedJSComponents } = require("./published-js-components");
const { publishedTSComponents } = require("./published-ts-components");
const { publishedStorybookComponents } = require("./published-storybook-components");

const SRC_PATH = path.join(__dirname, "../src");

const publishedComponents = { ...publishedJSComponents, ...publishedTSComponents, ...publishedStorybookComponents };
const publishedComponents = { ...publishedJSComponents, ...publishedTSComponents };

function getPublishedComponents() {
return Object.entries(publishedComponents).reduce(
Expand All @@ -22,7 +21,6 @@ module.exports = {
publishedComponents,
publishedJSComponents,
publishedTSComponents,
publishedStorybookComponents,
getPublishedComponents,
exposeIcons
};
10 changes: 0 additions & 10 deletions webpack/published-storybook-components.js

This file was deleted.

0 comments on commit fdae6a1

Please sign in to comment.