From 38acabfa6089ab8ac469c12b5f55022fb96935e5 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Mon, 23 Aug 2021 16:46:06 -0300 Subject: added web vendors --- .../Preact/preact-example/src/components/app.js | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 @linaria/examples/Preact/preact-example/src/components/app.js (limited to '@linaria/examples/Preact/preact-example/src/components/app.js') diff --git a/@linaria/examples/Preact/preact-example/src/components/app.js b/@linaria/examples/Preact/preact-example/src/components/app.js new file mode 100644 index 0000000..03b0292 --- /dev/null +++ b/@linaria/examples/Preact/preact-example/src/components/app.js @@ -0,0 +1,43 @@ +import { h, Component } from 'preact'; +import { Router } from 'preact-router'; + +import Header from './header'; + +import { css } from 'linaria'; +import { styled } from 'linaria/react'; + +// Code-splitting is automated for routes +import Home from '../routes/home'; +import Profile from '../routes/profile'; + +const Background = styled.div` + background-color: aliceblue; +`; + +const bluishText = css` + color: cornflowerblue; +` + +export default class App extends Component { + + /** Gets fired when the route changes. + * @param {Object} event "change" event from [preact-router](http://git.io/preact-router) + * @param {string} event.url The newly routed URL + */ + handleRoute = e => { + this.currentUrl = e.url; + }; + + render() { + return ( + +
+ + + + + + + ); + } +} -- cgit v1.2.3