Skip to content

Commit

Permalink
feat: add DesignPage
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jan 6, 2021
1 parent cc591f8 commit 3151653
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ui/pages/DesignPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import DesignPage from './dist/pages/DesignPage';
export default DesignPage;
1 change: 1 addition & 0 deletions ui/pages/DesignPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/DesignPage');
4 changes: 4 additions & 0 deletions ui/pages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
"ComponentPage.js",
"CurrentStoryPage.d.ts",
"CurrentStoryPage.js",
"DesignPage.d.ts",
"DesignPage.js",
"StoriesPage.d.ts",
"StoriesPage.js",
"TestingPage.d.ts",
Expand All @@ -43,8 +45,10 @@
},
"license": "MIT",
"dependencies": {
"@component-controls/addon-notes": "^2.5.3",
"@component-controls/axe-plugin": "^2.5.3",
"@component-controls/blocks": "^2.5.3",
"@component-controls/figma-embed": "^2.5.3",
"@component-controls/viewport-plugin": "^2.5.3"
},
"devDependencies": {
Expand Down
1 change: 1 addition & 0 deletions ui/pages/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export default config({
'./src/pages/ClassicPage.tsx',
'./src/pages/ComponentPage.tsx',
'./src/pages/CurrentStoryPage.tsx',
'./src/pages/DesignPage.tsx',
'./src/pages/StoriesPage.tsx',
'./src/pages/TestingPage.tsx',
],
Expand Down
25 changes: 25 additions & 0 deletions ui/pages/src/pages/DesignPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import React, { FC, Fragment } from 'react';
import { Playground, Story, Description } from '@component-controls/blocks';
import { TabConfiguration } from '@component-controls/core';
import { NotesBlock } from '@component-controls/addon-notes';
import { FigmaEmbedBlock } from '@component-controls/figma-embed';

const DesignPage: FC = () => {
return (
<Fragment>
<Description />
<Playground title=".">
<Story id="." />
</Playground>
<NotesBlock title="Design notes" />
<FigmaEmbedBlock title="Figma files" />
</Fragment>
);
};

export default {
title: 'Design',
component: DesignPage,
isVisible: ({ story }) =>
story.plugins && (story.plugins.figma || story.plugins.notes),
} as TabConfiguration;

0 comments on commit 3151653

Please sign in to comment.