Skip to content

Commit 5fefea8

Browse files
authored
Merge pull request #6 from BrainbaseHQ/abhinav/bra2-873-chat-embeddable-learned-improvements
Abhinav/bra2 873 chat embeddable learned improvements
2 parents 080c75f + 6bfee1e commit 5fefea8

9 files changed

Lines changed: 382 additions & 1092 deletions

File tree

.storybook/main.ts

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,12 @@ import type { StorybookConfig } from '@storybook/react-vite';
22

33
const config: StorybookConfig = {
44
stories: ['../stories/**/*.stories.@(js|jsx|mjs|ts|tsx)'],
5-
addons: [
6-
'@storybook/addon-links',
7-
'@storybook/addon-essentials',
8-
'@storybook/addon-interactions',
9-
],
5+
addons: ['@storybook/addon-links', '@storybook/addon-docs'],
6+
107
framework: {
118
name: '@storybook/react-vite',
129
options: {},
13-
},
14-
docs: {
15-
autodocs: 'tag',
16-
},
10+
}
1711
};
1812

1913
export default config;

.storybook/preview.ts

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import type { Preview } from '@storybook/react';
1+
import type { Preview } from '@storybook/react-vite';
22
import '../src/styles/variables.css';
33

44
const preview: Preview = {
@@ -11,14 +11,19 @@ const preview: Preview = {
1111
},
1212
},
1313
backgrounds: {
14-
default: 'light',
15-
values: [
16-
{ name: 'light', value: '#f5f5f5' },
17-
{ name: 'dark', value: '#1a1a2e' },
18-
{ name: 'white', value: '#ffffff' },
19-
],
14+
options: {
15+
light: { name: 'light', value: '#f5f5f5' },
16+
dark: { name: 'dark', value: '#1a1a2e' },
17+
white: { name: 'white', value: '#ffffff' }
18+
}
2019
},
2120
},
21+
22+
initialGlobals: {
23+
backgrounds: {
24+
value: 'light'
25+
}
26+
}
2227
};
2328

2429
export default preview;

eslint.config.js

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1+
// For more info, see https://github.com/storybookjs/eslint-plugin-storybook#configuration-flat-config-format
2+
import storybook from "eslint-plugin-storybook";
3+
14
import js from '@eslint/js';
25
import globals from 'globals';
36
import reactHooks from 'eslint-plugin-react-hooks';
47
import reactRefresh from 'eslint-plugin-react-refresh';
58
import tseslint from 'typescript-eslint';
69

7-
export default tseslint.config(
8-
{ ignores: ['dist', 'storybook-static', 'node_modules'] },
9-
{
10-
extends: [js.configs.recommended, ...tseslint.configs.recommended],
11-
files: ['**/*.{ts,tsx}'],
12-
languageOptions: {
13-
ecmaVersion: 2020,
14-
globals: globals.browser,
15-
},
16-
plugins: {
17-
'react-hooks': reactHooks,
18-
'react-refresh': reactRefresh,
19-
},
20-
rules: {
21-
...reactHooks.configs.recommended.rules,
22-
'react-refresh/only-export-components': [
23-
'warn',
24-
{ allowConstantExport: true },
25-
],
26-
'@typescript-eslint/no-unused-vars': [
27-
'error',
28-
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
29-
],
30-
},
31-
}
32-
);
10+
export default tseslint.config({ ignores: ['dist', 'storybook-static', 'node_modules'] }, {
11+
extends: [js.configs.recommended, ...tseslint.configs.recommended],
12+
files: ['**/*.{ts,tsx}'],
13+
languageOptions: {
14+
ecmaVersion: 2020,
15+
globals: globals.browser,
16+
},
17+
plugins: {
18+
'react-hooks': reactHooks,
19+
'react-refresh': reactRefresh,
20+
},
21+
rules: {
22+
...reactHooks.configs.recommended.rules,
23+
'react-refresh/only-export-components': [
24+
'warn',
25+
{ allowConstantExport: true },
26+
],
27+
'@typescript-eslint/no-unused-vars': [
28+
'error',
29+
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
30+
],
31+
},
32+
}, storybook.configs["flat/recommended"]);
3333

0 commit comments

Comments
 (0)