Skip to content
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "publish component updates",
"packageName": "@fluentui-contrib/react-cap-theme",
"email": "dzukowski@microsoft.com",
"dependentChangeType": "patch"
}
1 change: 0 additions & 1 deletion packages/react-cap-theme/.storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import type { StorybookConfig } from '@storybook/react-webpack5';

// eslint-disable-next-line @nx/enforce-module-boundaries
import rootConfig from '../../../.storybook/main';

const config: StorybookConfig = {
Expand Down
54 changes: 1 addition & 53 deletions packages/react-cap-theme/.storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,61 +1,9 @@
import * as React from 'react';
import type { Decorator, Preview } from '@storybook/react';
import type { Preview } from '@storybook/react';

// eslint-disable-next-line @nx/enforce-module-boundaries
import rootPreview from '../../../.storybook/preview';
import { CAPThemeSelectionProvider } from '../stories/StorybookUtils';

const withCAPTheme: Decorator = (Story, context) => {
const themeKey =
(context.globals.capTheme as
| 'current'
| 'teams'
| 'onedrive'
| 'sharepoint') ?? 'current';
return (
<CAPThemeSelectionProvider themeKey={themeKey}>
<Story />
</CAPThemeSelectionProvider>
);
};

const rootDecorators = rootPreview.decorators;
const normalizedDecorators: Decorator[] = Array.isArray(rootDecorators)
? rootDecorators
: rootDecorators
? [rootDecorators]
: [];

const preview: Preview = {
...rootPreview,
decorators: [...normalizedDecorators, withCAPTheme],
parameters: {
...rootPreview.parameters,
controls: {
...(rootPreview.parameters?.controls ?? {}),
disable: false,
expanded: true,
},
},
globalTypes: {
...(rootPreview.globalTypes ?? {}),
capTheme: {
name: 'Themes',
description: 'Select the theme for all CAP stories',
defaultValue: 'default',
toolbar: {
icon: 'paintbrush',
showName: true,
dynamicTitle: true,
items: [
{ value: 'default', title: 'Default' },
{ value: 'teams', title: 'CAP (Teams)' },
{ value: 'onedrive', title: 'CAP (OneDrive)' },
{ value: 'sharepoint', title: 'CAP (SharePoint)' },
],
},
},
},
tags: ['autodocs'],
};

Expand Down
6 changes: 6 additions & 0 deletions packages/react-cap-theme/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,10 @@ module.exports = [
// Override or add rules here
rules: {},
},
{
files: ['**/*.ts', '**/*.tsx'],
rules: {
'@nx/enforce-module-boundaries': 'off',
},
},
];
166 changes: 0 additions & 166 deletions packages/react-cap-theme/src/components/Badge/Badge.styles.ts

This file was deleted.

55 changes: 0 additions & 55 deletions packages/react-cap-theme/src/components/Button/Button.styles.ts

This file was deleted.

9 changes: 0 additions & 9 deletions packages/react-cap-theme/src/components/Button/Button.tsx

This file was deleted.

16 changes: 0 additions & 16 deletions packages/react-cap-theme/src/components/Button/Button.types.ts

This file was deleted.

20 changes: 0 additions & 20 deletions packages/react-cap-theme/src/components/Card/Card.styles.ts

This file was deleted.

This file was deleted.

This file was deleted.

Loading