Skip to content

Commit

Permalink
Add mobile example for AtlantisThemeContext
Browse files Browse the repository at this point in the history
  • Loading branch information
jdeichert committed Feb 21, 2025
1 parent 09b639a commit 9fe8b36
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions packages/site/src/content/AtlantisThemeContext/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,21 @@ export default {
</Box>
</AtlantisThemeContextProvider>
`,
mobileElement: `
const { theme, tokens, setTheme } = useAtlantisTheme();
return (
<AtlantisThemeContextProvider>
<View style={{ backgroundColor: tokens["color-surface"], borderRadius: tokens["radius-base"], width: "100%" }}>
<Content>
<Text>Current Theme: {theme}</Text>
<Button label="Set dark theme" onPress={() => setTheme("dark")} />
<Button label="Set light theme" onPress={() => setTheme("light")} />
</Content>
</View>
</AtlantisThemeContextProvider>
)
`,
},
title: "AtlantisThemeContext",
links: [
Expand Down

0 comments on commit 9fe8b36

Please sign in to comment.