forked from QwikDev/qwik
-
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.
feat: remove component$ host element (QwikDev#1019)
- Loading branch information
1 parent
7d10369
commit 3e18804
Showing
182 changed files
with
3,553 additions
and
3,835 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 |
---|---|---|
@@ -1,25 +1,22 @@ | ||
import { component$, Host, useContextProvider, useStore } from '@builder.io/qwik'; | ||
import { component$, useContextProvider, useStore } from '@builder.io/qwik'; | ||
import { Content } from '@builder.io/qwik-city'; | ||
import { GlobalStore, SiteStore } from '../../context'; | ||
|
||
export const Body = component$( | ||
() => { | ||
const store = useStore<SiteStore>({ | ||
headerMenuOpen: false, | ||
sideMenuOpen: false, | ||
}); | ||
useContextProvider(GlobalStore, store); | ||
export const Body = component$(() => { | ||
const store = useStore<SiteStore>({ | ||
headerMenuOpen: false, | ||
sideMenuOpen: false, | ||
}); | ||
useContextProvider(GlobalStore, store); | ||
|
||
return ( | ||
<Host | ||
class={{ | ||
'header-open': store.headerMenuOpen, | ||
'menu-open': store.sideMenuOpen, | ||
}} | ||
> | ||
<Content /> | ||
</Host> | ||
); | ||
}, | ||
{ tagName: 'body' } | ||
); | ||
return ( | ||
<body | ||
class={{ | ||
'header-open': store.headerMenuOpen, | ||
'menu-open': store.sideMenuOpen, | ||
}} | ||
> | ||
<Content /> | ||
</body> | ||
); | ||
}); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,27 @@ | ||
import { component$, Host, useStyles$ } from '@builder.io/qwik'; | ||
import { component$, useStyles$ } from '@builder.io/qwik'; | ||
import styles from './footer.css?inline'; | ||
|
||
export const Footer = component$( | ||
() => { | ||
useStyles$(styles); | ||
export const Footer = component$(() => { | ||
useStyles$(styles); | ||
|
||
return ( | ||
<Host class="pt-8 pb-12 px-2 flex flex-wrap justify-center sm:justify-between text-sm"> | ||
<nav class="flex py-2 px-2 md:px-0"> | ||
<a class="px-4 py-1" href="https://github.com/BuilderIO/qwik" target="_blank"> | ||
Github | ||
</a> | ||
<a class="px-4 py-1" href="https://twitter.com/QwikDev" target="_blank"> | ||
@QwikDev | ||
</a> | ||
<a class="px-4 py-1" href="https://qwik.builder.io/chat" target="_blank"> | ||
Discord | ||
</a> | ||
</nav> | ||
<div class="py-3 px-2 md:px-0"> | ||
<span>Made with ♡ by the </span> | ||
<a href="https://www.builder.io/">Builder.io</a> | ||
<span> team</span> | ||
</div> | ||
</Host> | ||
); | ||
}, | ||
{ tagName: 'footer' } | ||
); | ||
return ( | ||
<footer class="pt-8 pb-12 px-2 flex flex-wrap justify-center sm:justify-between text-sm"> | ||
<nav class="flex py-2 px-2 md:px-0"> | ||
<a class="px-4 py-1" href="https://github.com/BuilderIO/qwik" target="_blank"> | ||
Github | ||
</a> | ||
<a class="px-4 py-1" href="https://twitter.com/QwikDev" target="_blank"> | ||
@QwikDev | ||
</a> | ||
<a class="px-4 py-1" href="https://qwik.builder.io/chat" target="_blank"> | ||
Discord | ||
</a> | ||
</nav> | ||
<div class="py-3 px-2 md:px-0"> | ||
<span>Made with ♡ by the </span> | ||
<a href="https://www.builder.io/">Builder.io</a> | ||
<span> team</span> | ||
</div> | ||
</footer> | ||
); | ||
}); |
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
Oops, something went wrong.