-
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.
refa: compound components tutorial (#66)
* simplify layout * container to manage content * improve all the things * start page * done! * small adjustments * wrapping! * tutorial section * finish welcome page * refa: compound components tutorial * update * add more content * fix breakout * small fixes * ! * first part done? * improve benefit example * update * remove breadcrumbs * add footer whitespace * add basic tabs example * update * update * fix tabs example * refa for the tabs compound component * update * update * update * finished explaining code? * update * update * done! * fix * use dvh * css fix * landing adjustments * improve text * done! * remove unsued import
- Loading branch information
Showing
52 changed files
with
1,259 additions
and
417 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 was deleted.
Oops, something went wrong.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
You can find patterns here: https://heropatterns.com/ |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,19 @@ | ||
import { CH } from '@code-hike/mdx/components'; | ||
import type { ReactNode } from 'react'; | ||
|
||
export interface PreviewProps { | ||
children?: ReactNode; | ||
} | ||
|
||
const CodeHikePreview: any = CH['Preview']; | ||
|
||
export const Preview = ({ children }: PreviewProps) => ( | ||
// @ts-ignore | ||
<CodeHikePreview> | ||
<div data-theme="core" className="*:px-14 *:py-12"> | ||
{children} | ||
</div> | ||
</CodeHikePreview> | ||
); | ||
|
||
export default Preview; |
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,36 @@ | ||
import type { ReactNode } from 'react'; | ||
import { Breakout } from './Container'; | ||
|
||
export interface TitleProps { | ||
title?: ReactNode; | ||
caption?: ReactNode; | ||
image?: { | ||
url: string; | ||
size?: string; | ||
}; | ||
} | ||
|
||
export const Title = ({ title, caption, image }: TitleProps) => ( | ||
<Breakout | ||
className={[ | ||
'relative grid place-items-center', | ||
'bg-[linear-gradient(to_bottom,_var(--tw-gradient-stops)),var(--bg-image)] bg-repeat [background-size:auto,var(--bg-size)]', | ||
'from-violet-700/15 via-secondary-50 via-70% to-secondary-50', | ||
].join(' ')} | ||
style={ | ||
{ | ||
'--bg-image': image ? `url(${image.url})` : undefined, | ||
'--bg-size': image ? `${image.size || 'auto'}` : undefined, | ||
} as any | ||
} | ||
> | ||
<div className="absolute inset-x-0 top-0 h-8 bg-gradient-to-b from-neutral-700/50 via-neutral-700/10 via-20% to-transparent" /> | ||
|
||
<div className="px-20 pb-32 pt-52 text-center [background-image:radial-gradient(ellipse_at_bottom,rgba(248,250,252,1)_0%,rgba(248,250,252,1)_40%,transparent_70%)]"> | ||
<h1 className="p-0 text-secondary-950">{title}</h1> | ||
<div className="-mt-8 text-lg text-secondary-950/60">{caption}</div> | ||
</div> | ||
</Breakout> | ||
); | ||
|
||
export default Title; |
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
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
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
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 was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
src/routes/compound-component/_components/BreadcrumbsExample.tsx
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.