Skip to content

Commit

Permalink
feat: add pages for design addons
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasster committed Jan 6, 2021
1 parent 56b8a4f commit 1c16be6
Show file tree
Hide file tree
Showing 17 changed files with 90 additions and 6 deletions.
3 changes: 3 additions & 0 deletions plugins/addon-images/ImagesPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import ImagesPage from './dist/ImagesPage/ImagesPage';

export default ImagesPage;
1 change: 1 addition & 0 deletions plugins/addon-images/ImagesPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/ImagesPage');
4 changes: 3 additions & 1 deletion plugins/addon-images/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"files": [
"dist/",
"package.json",
"README.md"
"README.md",
"ImagesPage.d.ts",
"ImagesPage.js"
],
"scripts": {
"build": "yarn cross-env NODE_ENV=production rollup -c",
Expand Down
5 changes: 4 additions & 1 deletion plugins/addon-images/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { config } from '../../rollup-config';

export default config({
input: ['./src/index.ts'],
input: ['./src/index.ts', './src/ImagesPage/ImagesPage.tsx'],
output: {
exports: 'auto',
},
});
17 changes: 17 additions & 0 deletions plugins/addon-images/src/ImagesPage/ImagesPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { FC } from 'react';
import { TabConfiguration } from '@component-controls/core';
import { Description } from '@component-controls/blocks';
import { ImagesBlock, ImagesBlockProps } from '../ImagesBlock';

const ImagesPage: FC<ImagesBlockProps> = props => (
<>
<Description />
<ImagesBlock {...props} />
</>
);

export default {
title: 'Images',
component: ImagesPage,
isVisible: ({ story }) => story.plugins?.images,
} as TabConfiguration;
3 changes: 3 additions & 0 deletions plugins/addon-notes/NotesPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import NotesPage from './dist/NotesPage/NotesPage';

export default NotesPage;
1 change: 1 addition & 0 deletions plugins/addon-notes/NotesPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/NotesPage');
4 changes: 3 additions & 1 deletion plugins/addon-notes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"files": [
"dist/",
"package.json",
"README.md"
"README.md",
"NotesPage.d.ts",
"NotesPage.js"
],
"scripts": {
"build": "yarn cross-env NODE_ENV=production rollup -c",
Expand Down
5 changes: 4 additions & 1 deletion plugins/addon-notes/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { config } from '../../rollup-config';

export default config({
input: ['./src/index.ts'],
input: ['./src/index.ts', './src/NotesPage/NotesPage.tsx'],
output: {
exports: 'auto',
},
});
17 changes: 17 additions & 0 deletions plugins/addon-notes/src/NotesPage/NotesPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { FC } from 'react';
import { TabConfiguration } from '@component-controls/core';
import { Description } from '@component-controls/blocks';
import { NotesBlock, NotesBlockProps } from '../NotesBlock';

const NotesPage: FC<NotesBlockProps> = props => (
<>
<Description />
<NotesBlock {...props} />
</>
);

export default {
title: 'Notes',
component: NotesPage,
isVisible: ({ story }) => story.plugins?.notes,
} as TabConfiguration;
3 changes: 3 additions & 0 deletions plugins/axe-plugin/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ import { config } from '../../rollup-config';

export default config({
input: ['./src/index.tsx', './src/AllyPage/AllyPage.tsx'],
output: {
exports: 'auto',
},
});
3 changes: 3 additions & 0 deletions plugins/figma-embed/FigmaEmbedPage.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import FigmaEmbedPage from './dist/FigmaEmbedPage/FigmaEmbedPage';

export default FigmaEmbedPage;
1 change: 1 addition & 0 deletions plugins/figma-embed/FigmaEmbedPage.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('./dist/FigmaEmbedPage');
4 changes: 3 additions & 1 deletion plugins/figma-embed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"files": [
"dist/",
"package.json",
"README.md"
"README.md",
"FigmaEmbedPage.d.ts",
"FigmaEmbedPage.js"
],
"scripts": {
"build": "yarn cross-env NODE_ENV=production rollup -c",
Expand Down
5 changes: 4 additions & 1 deletion plugins/figma-embed/rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
import { config } from '../../rollup-config';

export default config({
input: ['./src/index.ts'],
input: ['./src/index.ts', './src/FigmaEmbedPage/FigmaEmbedPage.tsx'],
output: {
exports: 'auto',
},
});
17 changes: 17 additions & 0 deletions plugins/figma-embed/src/FigmaEmbedPage/FigmaEmbedPage.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import React, { FC } from 'react';
import { TabConfiguration } from '@component-controls/core';
import { Description } from '@component-controls/blocks';
import { FigmaEmbedBlock, FigmaEmbedBlockProps } from '../FigmaEmbedBlock';

const FigmaEmbedPage: FC<FigmaEmbedBlockProps> = props => (
<>
<Description />
<FigmaEmbedBlock {...props} />
</>
);

export default {
title: 'Figma',
component: FigmaEmbedPage,
isVisible: ({ story }) => story.plugins?.figma,
} as TabConfiguration;
3 changes: 3 additions & 0 deletions plugins/viewport-plugin/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,7 @@ import { config } from '../../rollup-config';

export default config({
input: ['./src/index.ts', './src/ViewportPage/ViewportPage.tsx'],
output: {
exports: 'auto',
},
});

0 comments on commit 1c16be6

Please sign in to comment.