Skip to content

Commit

Permalink
Merge pull request #158 from gridaco/insiders-integrations/storybook
Browse files Browse the repository at this point in the history
Insiders integrations/storybook - minimal storybook setup
  • Loading branch information
softmarshmallow authored Sep 7, 2021
2 parents 1fad534 + ac7a67a commit 1175757
Show file tree
Hide file tree
Showing 6 changed files with 4,683 additions and 210 deletions.
7 changes: 7 additions & 0 deletions .storybook/main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
module.exports = {
stories: [
"../app/lib/components/**/*.stories.mdx",
"../app/lib/components/**/*.stories.@(js|jsx|ts|tsx)",
],
addons: ["@storybook/addon-links", "@storybook/addon-essentials"],
};
9 changes: 9 additions & 0 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import { Meta, Story, Preview, Props } from "@storybook/addon-docs/blocks";
import { NavigatorExpansionControlButton } from "./navigator-expansion-control-button";

<Meta title="navigation/navigator-expansion-control-button" />

Close or expand button used for global navigation.

# Preview

<Preview>
<Story name="expand">
<NavigatorExpansionControlButton action="expand" />
</Story>
<Story name="close">
<NavigatorExpansionControlButton action="close" />
</Story>
</Preview>

# Props

<Props of={NavigatorExpansionControlButton} />
32 changes: 32 additions & 0 deletions app/lib/components/navigation/primary-workmode-select.stories.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import { Meta, Story, Preview, Props } from "@storybook/addon-docs/blocks";
import { PrimaryWorkmodeSelect } from "./primary-workmode-select";

<Meta title="navigation/primary-workmode-select" />

Primary workmode selector for navigation.

# Preview

<Preview>
<Story name="default">
<PrimaryWorkmodeSelect
set={{
first: "code",
second: "design",
}}
selection={"code"}
/>
</Story>
<Story name="no selection (for development)">
<PrimaryWorkmodeSelect
set={{
first: "code",
second: "design",
}}
/>
</Story>
</Preview>

# Props

<Props of={PrimaryWorkmodeSelect} />
107 changes: 59 additions & 48 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,50 +1,61 @@
{
"name": "@grida.co/assistant",
"version": "0.1.0",
"private": true,
"license": "https://github.com/bridgedxyz/contributing-and-license",
"description": "Grida assistant mono repository. for figma, sketch, zeplin.",
"workspaces": {
"packages": [
"app",
"figma",
"figma-core",
"figma-native",
"sketch",
"web",
"webdev",
"xd",
"packages/*",
"packages/reflect-core/packages/*",
"packages/design-sdk/*",
"packages/base-sdk/*",
"packages/base-sdk/_firstparty/*",
"packages/reflect-core/packages/*",
"packages/design-to-code/packages/designto-*",
"packages/design-to-code/packages/builder-config",
"packages/design-to-code/packages/coli/packages/*",
"packages/design-to-code/packages/coli-web-builder/*",
"packages/design-to-code/packages/reflect-detection"
]
},
"repository": "https://github.com/gridaco/assistant",
"author": "Grida.co, bridged.xyz softmarshmallow <[email protected]>",
"scripts": {
"pull:all": "git submodule update --init --recursive",
"figma-native": "yarn workspace figma-native run webpack:watch",
"figma": "yarn workspace figma run build:dev && yarn web",
"build:figma:prod": "yarn workspace figma run build",
"sketch": "yarn workspace sketch run render",
"web": "yarn workspace web run dev",
"xd": "yarn workspace xd run build",
"test": "cd figma-native && yarn build"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/bridged",
"logo": "https://opencollective.com/bridged/logo.txt"
},
"engines": {
"node": ">=12.0.0"
}
"name": "@grida.co/assistant",
"version": "0.1.0",
"private": true,
"license": "https://github.com/bridgedxyz/contributing-and-license",
"description": "Grida assistant mono repository. for figma, sketch, zeplin.",
"workspaces": {
"packages": [
"app",
"figma",
"figma-core",
"figma-native",
"sketch",
"web",
"webdev",
"xd",
"packages/*",
"packages/reflect-core/packages/*",
"packages/design-sdk/*",
"packages/base-sdk/*",
"packages/base-sdk/_firstparty/*",
"packages/reflect-core/packages/*",
"packages/design-to-code/packages/designto-*",
"packages/design-to-code/packages/builder-config",
"packages/design-to-code/packages/coli/packages/*",
"packages/design-to-code/packages/coli-web-builder/*",
"packages/design-to-code/packages/reflect-detection"
]
},
"repository": "https://github.com/gridaco/assistant",
"author": "Grida.co, bridged.xyz softmarshmallow <[email protected]>",
"scripts": {
"pull:all": "git submodule update --init --recursive",
"figma-native": "yarn workspace figma-native run webpack:watch",
"figma": "yarn workspace figma run build:dev && yarn web",
"build:figma:prod": "yarn workspace figma run build",
"sketch": "yarn workspace sketch run render",
"web": "yarn workspace web run dev",
"xd": "yarn workspace xd run build",
"test": "cd figma-native && yarn build",
"storybook": "start-storybook -p 6006",
"build-storybook": "build-storybook"
},
"collective": {
"type": "opencollective",
"url": "https://opencollective.com/bridged",
"logo": "https://opencollective.com/bridged/logo.txt"
},
"engines": {
"node": ">=12.0.0"
},
"devDependencies": {
"@babel/core": "^7.15.5",
"@storybook/addon-actions": "^6.3.8",
"@storybook/addon-essentials": "^6.3.8",
"@storybook/addon-links": "^6.3.8",
"@storybook/react": "^6.3.8",
"babel-loader": "^8.2.2"
},
"dependencies": {}
}
Loading

1 comment on commit 1175757

@vercel
Copy link

@vercel vercel bot commented on 1175757 Sep 7, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.