Initial commit
This commit is contained in:
0
src/components/footer.tsx
Normal file
0
src/components/footer.tsx
Normal file
0
src/components/header.ts
Normal file
0
src/components/header.ts
Normal file
0
src/components/layout.tsx
Normal file
0
src/components/layout.tsx
Normal file
22
src/components/link.tsx
Normal file
22
src/components/link.tsx
Normal file
@ -0,0 +1,22 @@
|
||||
import { Component, JSX } from "solid-js";
|
||||
import { LinkProps } from "../types/interfaces";
|
||||
|
||||
export const A: Component<LinkProps> = (
|
||||
{
|
||||
to,
|
||||
rel,
|
||||
children,
|
||||
className,
|
||||
id,
|
||||
newTab = true,
|
||||
}): JSX.Element => {
|
||||
return (
|
||||
<a href={ to } id={ id }
|
||||
rel={ `${ rel } ${ newTab ? "noreferrer" : undefined }` }
|
||||
target={ newTab ? "_blank" : undefined }
|
||||
class={ `link ${ className }` }>
|
||||
{ children }
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
0
src/components/navBar.tsx
Normal file
0
src/components/navBar.tsx
Normal file
11
src/index.css
Normal file
11
src/index.css
Normal file
@ -0,0 +1,11 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer components {
|
||||
|
||||
.link {
|
||||
@apply hover:underline text-blue-500;
|
||||
}
|
||||
|
||||
}
|
15
src/index.tsx
Normal file
15
src/index.tsx
Normal file
@ -0,0 +1,15 @@
|
||||
/* @refresh reload */
|
||||
import { render } from "solid-js/web";
|
||||
|
||||
import "./index.css";
|
||||
import type { Component } from "solid-js";
|
||||
|
||||
const HomePage: Component = () => {
|
||||
return (
|
||||
<>
|
||||
<p class="text-4xl text-green-700 text-center py-20">Hello tailwind!</p>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
render(() => <HomePage />, document.getElementById("root") as HTMLElement);
|
13
src/types/interfaces.ts
Normal file
13
src/types/interfaces.ts
Normal file
@ -0,0 +1,13 @@
|
||||
import { JSX } from "solid-js";
|
||||
|
||||
export interface ChildProps {
|
||||
children?: JSX.Element,
|
||||
className?: string,
|
||||
id?: string,
|
||||
}
|
||||
|
||||
export interface LinkProps extends ChildProps {
|
||||
to?: string,
|
||||
rel?: string,
|
||||
newTab?: boolean,
|
||||
}
|
Reference in New Issue
Block a user