8000 feat: implement Premium features page using shadcn/ui and Tailwind by jaaydenh · Pull Request #15094 · coder/coder · GitHub
[go: up one dir, main page]

Skip to content

feat: implement Premium features page using shadcn/ui and Tailwind #15094

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 27 commits into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: add useEffect cleanup function
  • Loading branch information
jaaydenh committed Nov 5, 2024
commit 25cbb8730c6d8f6bd007b6a1b6d42cce8cf99b62
7 changes: 6 additions & 1 deletion site/src/contexts/ThemeProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,16 @@ export const ThemeProvider: FC<PropsWithChildren> = ({ children }) => {

useEffect(() => {
const root = document.documentElement;
root.classList.remove("light", "dark");

if (themePreference === "auto") {
root.classList.add(preferredColorScheme);
} else {
root.classList.add(themePreference);
}

return () => {
root.classList.remove("light", "dark");
};
}, [themePreference, preferredColorScheme]);

const theme =
Expand All @@ -79,6 +83,7 @@ export const ThemeProvider: FC<PropsWithChildren> = ({ children }) => {
);
};

// This is being added to allow Tailwind and MUI to work together.
const cache = createCache({
key: "css",
prepend: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const EnterpriseVersion: FC = () => {
<p className="text-sm max-w-xl mt-2 text-content-secondary font-medium">
As an Enterprise license holder, you already benefit from Coder’s
features for secure, large-scale deployments. Upgrade to Coder
Premium for enhanced multi-tenant control and flexibility:
Premium for enhanced multi-tenant control and flexibility.
</p>
</div>
<Button asChild>
Expand Down
0