);
};
export const ThemeProviderPositiveExampleTemplate = () => {
return (
);
};
export const ThemeProviderNegativeExampleTemplate = () => {
return (
);
};
export const TipDev = () => (
Use ThemeProvider.systemThemes and ThemeProvider.colors enums to unleash the power of
auto-completion
);
export const UsageGuidelinesThemeProvider = () => (
Control themes in your application by setting theme classes (e.g. .light-app-theme) on your{" "}
body and render everything else inside it. Or use systemTheme prop to make
ThemeProvider set the theme class on the body for you.
>,
<>
In most common case ThemeProvider should be rendered only once on the root level of the application - below the{" "}
body.
>,
<>
ThemeProvider is populating theme name className to the new added div container which
wraps the children.
>
]}
/>
);
export const DescriptionWithLinkMondaySdkIntegration = () => (
<>
When developing an external application for monday.com (iframe). You can use ThemeProvider in
combination with the{" "}
monday.com SDK
, to apply monday.com system and product themes to your application. This will allow your application
to be consistent with the monday.com UI.
>
);
export const MondaySdkIntegrationSourceCode = `
import { ThemeProvider } from "monday-ui-react-core";
import mondaySdk from "monday-sdk-js";
const monday = mondaySdk();
const useGetContext = () => {
const [context, setContext] = useState({});
useEffect(() => {
monday.listen("context", (res) => {
setContext(res.data);
});
}, []);
return context;
};
const AppWrapper = () => {
const context = useGetContext();
return (
);
};
`;