import React from "react";
import { View } from "react-native";
import {
AtlantisThemeContextProvider,
Button,
Content,
Text,
useAtlantisTheme,
} from "@jobber/components-native";
import type { AtlantisThemeContextProviderProps } from "@jobber/components-native";
function ChildrenComponent({
message = "It is possible to have multiple Atlantis Theme providers.",
}: {
readonly message?: string;
}) {
const { theme, effectiveTheme, tokens, setTheme } = useAtlantisTheme();
return (
{message}
{`Selected theme: ${theme}`}
{`Effective theme: ${effectiveTheme}`}
Tokens can be accessed using tokens[token-name]
{`For example color-surface: ${tokens["color-surface"]}`}
);
}
function ForcedDarkThemeComponent() {
const { effectiveTheme, theme, tokens } = useAtlantisTheme();
return (
This will always be a dark theme
{`Selected theme: ${theme}`}
{`Effective theme: ${effectiveTheme}`}
);
}
export function AtlantisThemeContextForceThemeForProviderExample(
props: Partial>,
) {
return (
);
}