Skip to content

Commit

Permalink
Fix broken theme reference from bldrs-ai#606. Remove broken stories.
Browse files Browse the repository at this point in the history
  • Loading branch information
pablo-mayrgundter committed Feb 17, 2023
1 parent 62ca8f7 commit 5d002c8
Show file tree
Hide file tree
Showing 45 changed files with 4,223 additions and 506 deletions.
15 changes: 6 additions & 9 deletions .storybook/preview.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import {createContext} from 'react'
import {addDecorator} from '@storybook/react'
import {ThemeProvider} from '@mui/material/styles'
import useTheme from '../src/Theme'
import useShareTheme from '../src/theme/Theme'


export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
Expand All @@ -13,15 +14,11 @@ export const parameters = {
},
}

addDecorator((Story) => {
const {theme, colorMode} = useTheme()
const ColorModeContext = createContext({toggleColorMode: () => {}})

addDecorator((Story) => {
return (
<ColorModeContext.Provider value={colorMode}>
<ThemeProvider theme={theme}>
{Story()}
</ThemeProvider>
</ColorModeContext.Provider>
<ThemeProvider theme={useShareTheme()}>
{Story()}
</ThemeProvider>
)
})
212 changes: 0 additions & 212 deletions src/Components/Dialog_redesign.jsx

This file was deleted.

23 changes: 0 additions & 23 deletions src/Components/Dialog_redesign.test.jsx

This file was deleted.

2 changes: 1 addition & 1 deletion src/privacy/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export function isAnalyticsAllowed() {
*/
export function setIsAnalyticsAllowed(isAllowed) {
assertDefined(isAllowed)
Functional.setBoolean({component: 'cookies', name: 'isAnalyticsAllowed', value: isAllowed})
Functional.setCookieBoolean({component: 'cookies', name: 'isAnalyticsAllowed', value: isAllowed})
}
10 changes: 10 additions & 0 deletions src/privacy/functional.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,16 @@ export function getCookieBoolean(name, defaultValue) {
}


/**
* @param {string} name Name of the setting
* @param {boolean} value
*/
export function setCookieBoolean(name, value) {
assertDefined(name, value)
setCookie(name, value)
}


/**
* @param {string} name Name of the cookie
* @return {boolean} True iff the cookie is set
Expand Down
93 changes: 0 additions & 93 deletions src/stories/buttons/FormButton.stories.jsx

This file was deleted.

0 comments on commit 5d002c8

Please sign in to comment.