-
-
Notifications
You must be signed in to change notification settings - Fork 45
Themes #80
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
Themes #80
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,145 @@ | ||
| "use client"; | ||
|
|
||
| import { useState } from "react"; | ||
| import { | ||
| Card, | ||
| Select, | ||
| Text, | ||
| } from "@/components/retroui"; | ||
| import ChartStyleMultiple from "@/preview/charts/area-chart-style-multiple"; | ||
| import CourseCard from "@/preview/blocks/course-card"; | ||
| import SignInBlock from "@/preview/blocks/sign-in"; | ||
| import BarChartStyleMultiple from "@/preview/charts/bar-chart-style-multiple"; | ||
| import TeamMembersBlock from "@/preview/blocks/team-members"; | ||
| import CopyTheme from "@/components/CopyTheme"; | ||
| import { Theme } from "@/config/theme"; | ||
|
|
||
| const themes: {value: Theme, label: string}[] = [ | ||
| { | ||
| value: Theme.Default, | ||
| label: "Default", | ||
| }, | ||
| { | ||
| value: Theme.Purple, | ||
| label: "Purple", | ||
| }, | ||
| { | ||
| value: Theme.Lime, | ||
| label: "Lime", | ||
| }, | ||
| { | ||
| value: Theme.Red, | ||
| label: "Red", | ||
| }, | ||
| { | ||
| value: Theme.Lavender, | ||
| label: "Lavender", | ||
| }, | ||
| { | ||
| value: Theme.Orange, | ||
| label: "Orange", | ||
| }, | ||
| { | ||
| value: Theme.Green, | ||
| label: "Green", | ||
| }, | ||
| ]; | ||
|
|
||
| const variants = [ | ||
| { | ||
| value: "box", | ||
| label: "Box", | ||
| }, | ||
| { | ||
| value: "with-radius", | ||
| label: "Rounded", | ||
| }, | ||
| ]; | ||
|
|
||
| export default function Themes() { | ||
| const [theme, setTheme] = useState<Theme>(themes[0].value); | ||
| const [variant, setVariant] = useState(variants[0].value); | ||
|
|
||
| return ( | ||
| <section className={`theme-${theme} ${variant} container max-w-8xl mx-auto py-12`}> | ||
| <Text as="h1" className="font-normal mb-12">Don't like <span className="text-primary">{theme === Theme.Default ? "Yellow" : theme.slice(0, 1).toUpperCase() + theme.slice(1)}?</span><br />Well, we have more! 🫡</Text> | ||
|
|
||
| <div className="flex gap-6 items-center justify-between mb-6"> | ||
| <div className="flex gap-6"> | ||
| <Select onValueChange={(value: Theme) => setTheme(value)}> | ||
| <Select.Trigger> | ||
| <Select.Value placeholder="Select Color" /> | ||
| </Select.Trigger> | ||
| <Select.Content> | ||
| <Select.Group> | ||
| { | ||
| themes.map((theme) => ( | ||
| <Select.Item key={theme.value} value={theme.value}> | ||
| {theme.label} | ||
| </Select.Item> | ||
| )) | ||
| } | ||
| </Select.Group> | ||
| </Select.Content> | ||
| </Select> | ||
|
|
||
| <Select onValueChange={(value) => setVariant(value)}> | ||
| <Select.Trigger> | ||
| <Select.Value placeholder="Select Variant" /> | ||
| </Select.Trigger> | ||
| <Select.Content> | ||
| <Select.Group> | ||
| { | ||
| variants.map((variant) => ( | ||
| <Select.Item key={variant.value} value={variant.value}> | ||
| {variant.label} | ||
| </Select.Item> | ||
| )) | ||
| } | ||
| </Select.Group> | ||
| </Select.Content> | ||
| </Select> | ||
| </div> | ||
|
|
||
| <CopyTheme theme={theme} hasRadius={variant === "with-radius"} /> | ||
| </div> | ||
|
|
||
| <div className="grid grid-cols-3 w-full gap-6"> | ||
| <div className="flex flex-col gap-6"> | ||
| <Card className="w-full border-muted bg-background shadow-none"> | ||
| <Card.Content> | ||
| <CourseCard /> | ||
| </Card.Content> | ||
| </Card> | ||
|
|
||
| <Card className="w-full border-muted bg-background shadow-none"> | ||
| <Card.Content> | ||
| <TeamMembersBlock /> | ||
| </Card.Content> | ||
| </Card> | ||
| </div> | ||
|
|
||
|
|
||
| <div className="flex flex-col gap-6"> | ||
| <Card className="w-full border-muted bg-background shadow-none"> | ||
| <Card.Content> | ||
| <ChartStyleMultiple /> | ||
| </Card.Content> | ||
| </Card> | ||
| <Card className="w-full border-muted bg-background shadow-none"> | ||
| <Card.Content> | ||
| <BarChartStyleMultiple /> | ||
| </Card.Content> | ||
| </Card> | ||
| </div> | ||
|
|
||
|
|
||
| <Card className="w-full border-muted bg-background shadow-none"> | ||
| <Card.Content> | ||
| <SignInBlock /> | ||
| </Card.Content> | ||
| </Card> | ||
| </div> | ||
| </section> | ||
| ); | ||
| } | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
❓ Verification inconclusive
Verify Tailwind support for max-w-8xl.
Ensure
8xlis defined; default Tailwind stops at 7xl.🏁 Script executed:
Length of output: 154
Add custom
8xlmax-width or switch to7xl. Default Tailwind definesmax-wonly up to7xl; no8xlentry was found intheme.extend.maxWidth. Either add an8xlvalue in yourtailwind.config.(js|ts)or update this class tomax-w-7xl.🤖 Prompt for AI Agents