Skip to content

Commit

Permalink
chore: Added a way to manually test the hooks in dev.
Browse files Browse the repository at this point in the history
  • Loading branch information
Blankeos committed Oct 5, 2024
1 parent 49e54cd commit 4487fe8
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 51 deletions.
Binary file modified bun.lockb
Binary file not shown.
33 changes: 0 additions & 33 deletions dev/App.module.css

This file was deleted.

30 changes: 12 additions & 18 deletions dev/App.tsx
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
import type { Component } from 'solid-js'
import logo from './logo.svg'
import styles from './App.module.css'
import './app.css'

// Hooks
import { useClickOutside } from '../src'

const App: Component = () => {
let ref = useClickOutside(() => {
alert('I have clicked outside')
})

return (
<div class={styles.App}>
<header class={styles.header}>
<img src={logo} class={styles.logo} alt="logo" />
<h1></h1>
<p>
Edit <code>src/App.tsx</code> and save to reload.
</p>
<a
class={styles.link}
href="https://github.com/solidjs/solid"
target="_blank"
rel="noopener noreferrer"
>
Learn Solid
</a>
</header>
<div class="">
<p class="bg-green-500" ref={ref}>
Hello world!
</p>
</div>
)
}
Expand Down
3 changes: 3 additions & 0 deletions dev/app.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,15 +56,18 @@
"@types/node": "^22.7.4",
"@typescript-eslint/eslint-plugin": "^8.7.0",
"@typescript-eslint/parser": "^8.7.0",
"autoprefixer": "^10.4.20",
"concurrently": "^9.0.1",
"esbuild": "^0.24.0",
"esbuild-plugin-solid": "^0.6.0",
"eslint": "^9.11.1",
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-no-only-tests": "^3.3.0",
"jsdom": "^25.0.1",
"postcss": "^8.4.47",
"prettier": "3.3.3",
"solid-js": "^1.9.1",
"tailwindcss": "^3.4.13",
"tsup": "^8.3.0",
"tsup-preset-solid": "^2.2.0",
"typescript": "^5.6.2",
Expand Down
6 changes: 6 additions & 0 deletions postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
}
8 changes: 8 additions & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/** @type {import('tailwindcss').Config} */
export default {
content: ['./dev/**/*.{html,js,ts,jsx,tsx}'],
theme: {
extend: {},
},
plugins: [],
}

0 comments on commit 4487fe8

Please sign in to comment.