Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs-site/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
node_modules
dist
vendor
*.local
8 changes: 8 additions & 0 deletions docs-site/.oxlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"$schema": "./node_modules/oxlint/configuration_schema.json",
"plugins": ["react", "oxc"],
"rules": {
"react/rules-of-hooks": "error",
"react/only-export-components": ["warn", { "allowConstantExport": true }]
}
}
1 change: 1 addition & 0 deletions docs-site/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# React dropdown select site
37 changes: 37 additions & 0 deletions docs-site/copy-src.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
import fs from 'fs'
import path from 'path'
import { fileURLToPath } from 'url'

const __dirname = path.dirname(fileURLToPath(import.meta.url))
const srcDir = path.resolve(__dirname, '../src')
const targetDir = path.resolve(__dirname, './vendor/src')

function copyWithJsx(dir, targetBase) {
if (!fs.existsSync(targetBase)) {
fs.mkdirSync(targetBase, { recursive: true })
}

for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
const srcPath = path.join(dir, entry.name)
const targetName = entry.isDirectory()
? entry.name
: entry.name.replace(/\.js$/, '.jsx')
const targetPath = path.join(targetBase, targetName)

if (entry.isDirectory()) {
copyWithJsx(srcPath, targetPath)
} else if (entry.name.endsWith('.js')) {
fs.copyFileSync(srcPath, targetPath)
} else {
fs.copyFileSync(srcPath, targetPath)
}
}
}

// Clean and copy
if (fs.existsSync(targetDir)) {
fs.rmSync(targetDir, { recursive: true })
}

copyWithJsx(srcDir, targetDir)
console.log('Copied src -> vendor/src with .js -> .jsx')
17 changes: 17 additions & 0 deletions docs-site/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>react-dropdown-select - A flexible dropdown select component for React</title>
<meta name="description" content="A customizable dropdown select / multi-select React component with full render-prop overrides, portal support, auto-positioning, and CSS-in-JS styling." />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
</html>
Loading
Loading