1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2024-12-26 08:44:36 +01:00
Whalebird-desktop-client-ma.../renderer/pages/_app.tsx

123 lines
3.2 KiB
TypeScript
Raw Normal View History

2023-11-01 17:20:27 +01:00
import type { AppProps } from 'next/app'
2024-03-09 10:26:43 +01:00
import '../app.scss'
2023-11-01 17:20:27 +01:00
import AccountLayout from '@/components/layouts/account'
import TimelineLayout from '@/components/layouts/timelines'
import { IntlProviderWrapper } from '@/provider/i18n'
import { ThemeProvider } from '@material-tailwind/react'
import { ToastProvider } from '@/provider/toast'
import { UnreadsProvider } from '@/provider/unreads'
import { AccountsProvider } from '@/provider/accounts'
2023-11-01 17:20:27 +01:00
export default function MyApp({ Component, pageProps }: AppProps) {
const customTheme = {
popover: {
styles: {
base: {
p: 'p-0'
}
}
},
input: {
styles: {
variants: {
outlined: {
base: {
input: {
floated: {
borderWidth: 'border focus:border'
}
},
label: {
before: {
floated: {
bt: 'before:border-t peer-focus:before:border-t-1',
bl: 'before:border-l peer-focus:before:border-l-1'
}
},
after: {
floated: {
bt: 'after:border-t peer-focus:after:border-t-1',
br: 'after:border-r peer-focus:after:border-r-1'
}
}
}
}
}
}
}
},
textarea: {
styles: {
variants: {
outlined: {
base: {
textarea: {
floated: {
borderWidth: 'border focus:border'
}
},
label: {
before: {
floated: {
bt: 'before:border-t peer-focus:before:border-t-1',
bl: 'before:border-l peer-focus:before:border-l-1'
}
},
after: {
floated: {
bt: 'after:border-t peer-focus:after:border-t-1',
br: 'after:border-r peer-focus:after:border-r-1'
}
}
}
}
}
}
}
},
select: {
styles: {
variants: {
outlined: {
states: {
open: {
select: {
borderWidth: 'border'
},
label: {
before: {
bt: 'before:border-t',
bl: 'before:border-l'
},
after: {
bt: 'after:border-t',
br: 'after:border-r'
}
}
}
}
}
}
}
}
}
2023-11-01 17:20:27 +01:00
return (
<ThemeProvider value={customTheme}>
<IntlProviderWrapper>
2024-01-28 12:41:36 +01:00
<ToastProvider>
2024-01-28 14:17:47 +01:00
<UnreadsProvider>
<AccountsProvider>
<AccountLayout>
<TimelineLayout>
<Component {...pageProps} />
</TimelineLayout>
</AccountLayout>
</AccountsProvider>
2024-01-28 14:17:47 +01:00
</UnreadsProvider>
2024-01-28 12:41:36 +01:00
</ToastProvider>
</IntlProviderWrapper>
</ThemeProvider>
2023-11-01 17:20:27 +01:00
)
}