fix: use harmony-ui toast and update gitignore to ignore .npmrc
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -24,3 +24,6 @@ dist-ssr
|
|||||||
*.njsproj
|
*.njsproj
|
||||||
*.sln
|
*.sln
|
||||||
*.sw?
|
*.sw?
|
||||||
|
|
||||||
|
# npm registry
|
||||||
|
.npmrc
|
||||||
|
|||||||
1658
package-lock.json
generated
1658
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -15,6 +15,7 @@
|
|||||||
"@emotion/styled": "^11.14.1",
|
"@emotion/styled": "^11.14.1",
|
||||||
"@mui/material": "^7.2.0",
|
"@mui/material": "^7.2.0",
|
||||||
"@mui/stylis-plugin-rtl": "^7.2.0",
|
"@mui/stylis-plugin-rtl": "^7.2.0",
|
||||||
|
"@rkheftan/harmony-ui": "^0.1.5",
|
||||||
"i18next": "^25.3.0",
|
"i18next": "^25.3.0",
|
||||||
"i18next-browser-languagedetector": "^8.2.0",
|
"i18next-browser-languagedetector": "^8.2.0",
|
||||||
"i18next-http-backend": "^3.0.2",
|
"i18next-http-backend": "^3.0.2",
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { LanguageManager } from './components/LanguageManager';
|
|||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const showToast = useToast();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -41,6 +42,9 @@ function App() {
|
|||||||
</Alert>
|
</Alert>
|
||||||
</Box>
|
</Box>
|
||||||
</div>
|
</div>
|
||||||
|
<Button onClick={() => showToast({ message: 'info toast' })}>
|
||||||
|
toast
|
||||||
|
</Button>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -48,6 +52,7 @@ function App() {
|
|||||||
export default App;
|
export default App;
|
||||||
|
|
||||||
import { Button } from '@mui/material';
|
import { Button } from '@mui/material';
|
||||||
|
import { useToast } from '@rkheftan/harmony-ui';
|
||||||
|
|
||||||
export const ThemeToggleButton = () => {
|
export const ThemeToggleButton = () => {
|
||||||
const { mode, setMode } = useColorScheme();
|
const { mode, setMode } = useColorScheme();
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { I18nextProvider } from 'react-i18next';
|
|||||||
import i18n from '@/config/i18n';
|
import i18n from '@/config/i18n';
|
||||||
import { CustomThemeProvider } from './CustomThemeProvider';
|
import { CustomThemeProvider } from './CustomThemeProvider';
|
||||||
import { RtlProvider } from './RtlProvider';
|
import { RtlProvider } from './RtlProvider';
|
||||||
|
import { ToastProvider } from '@rkheftan/harmony-ui';
|
||||||
|
|
||||||
export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
|
export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
|
||||||
children,
|
children,
|
||||||
@@ -10,7 +11,9 @@ export const AppProviders: React.FC<{ children: React.ReactNode }> = ({
|
|||||||
return (
|
return (
|
||||||
<I18nextProvider i18n={i18n}>
|
<I18nextProvider i18n={i18n}>
|
||||||
<RtlProvider>
|
<RtlProvider>
|
||||||
<CustomThemeProvider>{children}</CustomThemeProvider>
|
<CustomThemeProvider>
|
||||||
|
<ToastProvider>{children}</ToastProvider>
|
||||||
|
</CustomThemeProvider>
|
||||||
</RtlProvider>
|
</RtlProvider>
|
||||||
</I18nextProvider>
|
</I18nextProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user