Skip to content

Commit

Permalink
feat: add default theme to sdk (#577)
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbh authored Apr 8, 2024
1 parent 3892961 commit b565f6b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sdks/js/packages/core/react/components/organization/profile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ const routerContext = new RouterContext<

const RootRouter = () => {
const { organizationId } = useRouterContext({ from: '__root__' });
const { client, setActiveOrganization, setIsActiveOrganizationLoading } =
useFrontier();
const {
client,
setActiveOrganization,
setIsActiveOrganizationLoading,
config
} = useFrontier();

const fetchOrganization = useCallback(async () => {
try {
Expand Down Expand Up @@ -89,7 +93,7 @@ const RootRouter = () => {
}, [organizationId, fetchOrganization, setActiveOrganization]);

return (
<ThemeProvider>
<ThemeProvider defaultTheme={config?.theme}>
<SkeletonTheme
highlightColor="var(--background-base)"
baseColor="var(--background-base-hover)"
Expand Down
1 change: 1 addition & 0 deletions sdks/js/packages/core/shared/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export interface FrontierClientBillingOptions {
}

export interface FrontierClientOptions {
theme?: 'dark' | 'light';
endpoint?: string;
redirectSignup?: string;
redirectLogin?: string;
Expand Down

0 comments on commit b565f6b

Please sign in to comment.