Skip to content

Commit

Permalink
Merge pull request #16 from regisrex/release
Browse files Browse the repository at this point in the history
  • Loading branch information
pacifiquem authored Oct 1, 2023
2 parents f1aeb1a + ea1b4c2 commit bf9a619
Show file tree
Hide file tree
Showing 7 changed files with 1,291 additions and 22 deletions.
5 changes: 4 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
],
"rules": {
"no-unused-vars": "error",
"@typescript-eslint/no-explicit-any": "off"
"@typescript-eslint/no-explicit-any": "off",
"no-unused-expressions": ["error", {
"allowTernary": true
}]
}
}
2 changes: 1 addition & 1 deletion demo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>FTSA</title>
<title>string-hunt</title>
</head>
<body>
<div id="app"></div>
Expand Down
26 changes: 8 additions & 18 deletions demo/src/app.jsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,7 @@
import search from 'string-hunt'
import { useEffect, useState } from 'preact/hooks'
import FormatJson from './components/jsonFormatter'

const data = [
{
name: "John doe",
date: "10/10/2020",
age: 12
},
{
name: "Ivan doe",
date: "10/10/2020",
age: 14
},
]
import data from './utils/data'

export function App() {
const [query, setQuery] = useState("")
Expand All @@ -29,8 +17,8 @@ export function App() {
<div className='text-white py-4 flex items-center justify-between'>
<h1>📦 string-hunt v0.0.3</h1>
<div className='flex items-center gap-4'>
<a>Github</a>
<a>npm</a>
<a href='https://github.com/regisrex/string-hunt' target='_black'>Github</a>
<a href='https://npmjs.com/package/string-hunt' target='_black'>npm</a>
</div>
</div>
<input type="text" className='bg-white/10 w-full text-lg text-white p-4 outline-none' placeholder='🔎 Your query here...' onChange={(e) => setQuery(e.target.value.trim())} />
Expand All @@ -39,9 +27,11 @@ export function App() {
<FormatJson title={"Output"} json={visible} />
</div>

<div className='text-white/60 flex items-center justify-between fixed bottom-0 gap-5' >
<h1>MIT LICENCE</h1> <span></span>
<h1>Maintained by <a>@pacifiquem</a> & <a>@regisrex</a> </h1>
<div className='flex items-center justify-center'>
<div className='text-white/60 flex items-center justify-between fixed bottom-0 gap-5' >
<h1>MIT LICENCE</h1> <span></span>
<h1>Maintained by <a href='https://github.com/pacifiquem' target='_black'>@pacifiquem</a> & <a href='https://github.com/regisrex' target='_black'>@regisrex</a> </h1>
</div>
</div>
</div>
)
Expand Down
2 changes: 1 addition & 1 deletion demo/src/components/jsonFormatter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function FormatJson({ json, title }) {

}

return <div className="p-10 bg-neutral-700 bg-opacity-30 ">
return <div className="p-10 bg-neutral-700 bg-opacity-30 h-[60vh] overflow-auto">
<h1 className="text-3xl text-white font-semibold">{ title }</h1>
<hr className="my-4 opacity-10"/>
<JsonFormatter json={json} tabWith={4} jsonStyle={jsonStyle} />
Expand Down
24 changes: 23 additions & 1 deletion demo/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,26 @@

a{
color: darkorange;
}
}

/* Define the scrollbar track */
div::-webkit-scrollbar {
width: 5px; /* Adjust the width as needed */
}

/* Define the scrollbar thumb */
div::-webkit-scrollbar-thumb {
background-color: orange; /* Change the color of the scrollbar thumb */
border-radius: 5px; /* Round the corners of the thumb */
}

/* Define the scrollbar track (background) */
div::-webkit-scrollbar-track {
background-color: gray; /* Change the color of the scrollbar track */
}

/* Define the scrollbar corner */
div::-webkit-scrollbar-corner {
background-color: transparent; /* Change the color of the scrollbar corner */
}

40 changes: 40 additions & 0 deletions demo/src/utils/data.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
const data = [
{
id: 1,
name: "John Doe",
age: 30,
address: {
street: "123 Main St",
city: "New York",
state: "NY",
},
email: "[email protected]",
phone: "555-123-4567",
hobbies: ["Reading", "Gardening"],
isActive: true,
socialMedia: {
twitter: "@johndoe",
instagram: "@johndoe123",
},
},
{
id: 2,
name: "Jane Smith",
age: 25,
address: {
street: "456 Elm St",
city: "Los Angeles",
state: "CA",
},
email: "[email protected]",
phone: "555-987-6543",
hobbies: ["Painting", "Cooking"],
isActive: false,
socialMedia: {
twitter: "@janesmith",
instagram: "@janesmith456",
},
},
];

export default data;
Loading

0 comments on commit bf9a619

Please sign in to comment.