-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
186 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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,22 @@ | ||
import type { ComponentProps } from 'react'; | ||
import { cn } from '@marigold/system'; | ||
|
||
const VARIANTS = { | ||
default: '', | ||
cta: 'flex items-center h-7 rounded bg-gradient-to-tr from-purple-700 to-purple-500 px-2 text-white shadow transition-transform hover:scale-110 no-underline', | ||
}; | ||
|
||
export interface LinkProps extends ComponentProps<'a'> { | ||
variant?: keyof typeof VARIANTS; | ||
} | ||
|
||
export const Link = ({ | ||
className, | ||
variant = 'default', | ||
children, | ||
...props | ||
}: LinkProps) => ( | ||
<a {...props} className={cn(VARIANTS[variant], className)}> | ||
{children} | ||
</a> | ||
); |
This file contains 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
60 changes: 60 additions & 0 deletions
60
src/routes/compound-component/_components/TabsActionExample.tsx
This file contains 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,60 @@ | ||
import { MarigoldProvider } from '@marigold/components'; | ||
import theme from '@marigold/theme-core'; | ||
|
||
import { Tabs } from './Tabs'; | ||
import { Link } from './Link'; | ||
|
||
const App = () => ( | ||
<MarigoldProvider theme={theme} className="h-[340px]"> | ||
<Tabs defaultActiveTab="description"> | ||
<Tabs.List> | ||
<Tabs.Item id="description">Description</Tabs.Item> | ||
<Tabs.Item id="locations">Locations</Tabs.Item> | ||
<Tabs.Item id="merchandise">Merchandise</Tabs.Item> | ||
<Link | ||
variant="cta" | ||
className="ml-auto" | ||
href="https://www.reservix.de/" | ||
target="_blank" | ||
rel="noreferrer" | ||
> | ||
Buy Tickets! | ||
</Link> | ||
</Tabs.List> | ||
<Tabs.Panel id="description"> | ||
<div className="prose"> | ||
<strong>DJ Wobblemeister's Wobble Extravaganza</strong> | ||
<p className="m-0"> | ||
Join us for an unforgettable night with DJ Wobblemeister, the | ||
maestro of wobble beats and king of quirky dance moves. Expect an | ||
evening filled with thumping bass, wobbly rhythms, and an | ||
unparalleled light show. It's going to be a wobbly good time! | ||
</p> | ||
</div> | ||
</Tabs.Panel> | ||
<Tabs.Panel id="locations"> | ||
<ul className="prose m-0"> | ||
<li>Wobbleville - June 20th</li> | ||
<li>Bass City - June 25th</li> | ||
<li>Quirkytown - July 1st</li> | ||
<li>Beatsburgh - July 5th</li> | ||
</ul> | ||
</Tabs.Panel> | ||
<Tabs.Panel id="merchandise"> | ||
<div className="prose"> | ||
<p className="mt-0"> | ||
Grab your exclusive DJ Wobblemeister merchandise at the concert! | ||
</p> | ||
<ul> | ||
<li>Wobble Hats - $25</li> | ||
<li>Quirky T-Shirts - $30</li> | ||
<li>Bass Boosted Hoodies - $50</li> | ||
<li>Glow-in-the-dark Wobble Wristbands - $10</li> | ||
</ul> | ||
</div> | ||
</Tabs.Panel> | ||
</Tabs> | ||
</MarigoldProvider> | ||
); | ||
|
||
export default App; |
This file contains 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 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