-
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
9 changed files
with
108 additions
and
26 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
import './code.css' | ||
|
||
export { Page } | ||
|
||
function Page() { | ||
|
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 |
---|---|---|
@@ -1,12 +1,30 @@ | ||
import { useState } from 'react' | ||
import { useState } from 'react'; | ||
import { panda } from '../../styled-system/jsx'; | ||
|
||
export { Counter } | ||
|
||
function Counter() { | ||
const [count, setCount] = useState(0) | ||
return ( | ||
<button type="button" onClick={() => setCount((count) => count + 1)}> | ||
<panda.button | ||
cursor={ "pointer" } | ||
paddingBlock={ 5 } | ||
paddingInline={ 10 } | ||
background={ "bg.accent" } | ||
fontWeight={ 700 } | ||
boxShadow="0 0 10px rgba(0, 0, 0, 0.4)" | ||
transition={ "0.3s ease" } | ||
_hover={ { | ||
boxShadow:"0 0 15px rgba(0, 0, 0, 0.5)", | ||
} } | ||
_dark={ | ||
{ | ||
color: "bg.surface" | ||
} | ||
} | ||
type="button" | ||
onClick={ () => setCount((count) => count + 1) }> | ||
Counter {count} | ||
</button> | ||
</panda.button> | ||
) | ||
} |
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 |
---|---|---|
@@ -1,18 +1,46 @@ | ||
import { Counter } from './Counter' | ||
import { Counter } from "./Counter"; | ||
import { Link } from "../../renderer/Link"; | ||
import { panda } from '../../styled-system/jsx'; | ||
|
||
export { Page } | ||
export { Page }; | ||
|
||
function Page() { | ||
return ( | ||
<> | ||
<h1>Welcome</h1> | ||
<panda.h1> | ||
🐼 vite-plugin-ssr with{" "} | ||
<Link | ||
variant="unstyled" | ||
href="https://twitter.com/panda__css" | ||
target="_blank" | ||
rel="noopener noreferrer" | ||
> | ||
Panda CSS | ||
</Link> | ||
🐼 | ||
</panda.h1> | ||
This page is: | ||
<ul> | ||
<li>Rendered to HTML.</li> | ||
<li> | ||
Interactive. <Counter /> | ||
</li> | ||
<li> | ||
Works with : | ||
<br /> | ||
<ul> | ||
<li>Server side rendering (ssr)</li> | ||
<li>Static site generation (ssg)</li> | ||
</ul> | ||
💡Prerendered by default using global plugin configuration | ||
</li> | ||
<li>Small theming example with `panda.config.ts`</li> | ||
<li>Including Dark theme ssr compliant 🌕</li> | ||
<li>Variant example with the { '"Link"' } component</li> | ||
<li>JSX styled system example with the { '"panda"' } component to build the { '"Counter"' } component</li> | ||
<li>Global CSS</li> | ||
<li>Runtime free ⚡</li> | ||
</ul> | ||
</> | ||
) | ||
} | ||
); | ||
} |
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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