Skip to content

Commit

Permalink
Merge pull request #28 from gt-ospo/new-license-options
Browse files Browse the repository at this point in the history
Added more license options
  • Loading branch information
jyoung3131 authored Sep 9, 2024
2 parents aad7b4a + 1d24096 commit 57baa21
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 26 deletions.
10 changes: 1 addition & 9 deletions src/App.jsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
import './index.css'
import './App.css';
import { BrowserRouter, Routes, Route } from 'react-router-dom';
import ProjectForm from './components/ProjectFormPage/ProjectForm';
import ProjectExplorer from './components/ProjectExplorerPage/ProjectExplorer';

function App() {
return (
// <div className="App">
// <BrowserRouter>
// <Routes>
// <Route path="/" element={<ProjectExplorer />}/>
// </Routes>
// </BrowserRouter>
// </div>
<ProjectExplorer/>
);
}
Expand Down
26 changes: 14 additions & 12 deletions src/components/LicenseFilter/LicenseFilter.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@ const LicenseFilter = ({ onLicenseFilterChange }) => {
return (
<div>
<h2 className="flex text-xl font-semibold pb-3 pt-5">License</h2>
{licenseOptions.map(option => (
<div key={option.value} className="flex items-center mb-2">
<input
type="checkbox"
id={option.value}
name={option.value}
value={option.value}
onChange={onLicenseFilterChange}
className="w-5 h-5 rounded"
/>
<label htmlFor={option.value} className="ml-2">{option.label}</label>
<div className="max-h-[23vh] overflow-y-scroll scrollbar">
{licenseOptions.map(option => (
<div key={option.value} className="flex items-center mb-2">
<input
type="checkbox"
id={option.value}
name={option.value}
value={option.value}
onChange={onLicenseFilterChange}
className="w-5 h-5 rounded"
/>
<label htmlFor={option.value} className="ml-2">{option.label}</label>
</div>
))}
</div>
))}
</div>
)
};
Expand Down
24 changes: 20 additions & 4 deletions src/data/licenseOptions.jsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,24 @@
const licenseOptions = [
{ value: 'MIT', label: 'MIT License' },
{ value: 'Apache', label: 'Apache License 2.0' },
{ value: 'ISC', label: 'ISC License' },
{ value: 'BSD-3', label: 'BSD 3-Clause "New" or "Revised" License' },
{ value: 'AGPL-3.0', label: 'AGPL-3.0' },
{ value: 'Apache-2.0', label: 'Apache-2.0' },
{ value: 'BSD-2-Clause', label: 'BSD-2-Clause' },
{ value: 'BSD-3-Clause', label: 'BSD-3-Clause' },
{ value: 'Creative Commons', label: 'Creative Commons' },
{ value: 'GPL-2.0-only', label: 'GPL-2.0-only' },
{ value: 'GPL-2.0-or-later', label: 'GPL-2.0-or-later' },
{ value: 'GPL-3.0-only', label: 'GPL-3.0-only' },
{ value: 'GPL-3.0-or-later', label: 'GPL-3.0-or-later' },
{ value: 'LGPL-2.0-only', label: 'LGPL-2.0-only' },
{ value: 'LGPL-2.0-or-later', label: 'LGPL-2.0-or-later' },
{ value: 'LGPL-2.1-only', label: 'LGPL-2.1-only' },
{ value: 'LGPL-2.1-or-later', label: 'LGPL-2.1-or-later' },
{ value: 'LGPL-3.0-only', label: 'LGPL-3.0-only' },
{ value: 'LGPL-3.0-or-later', label: 'LGPL-3.0-or-later' },
{ value: 'MIT', label: 'MIT' },
{ value: 'Proprietary License (Other)', label: 'Proprietary License (Other)' },
{ value: 'Public Domain', label: 'Public Domain' },
{ value: 'Python License 2.0.1', label: 'Python License 2.0.1' },
{ value: 'Unlicense', label: 'Unlicense' },
];

export default licenseOptions;
25 changes: 24 additions & 1 deletion src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,27 @@

@import "tailwindcss/components";

@import "tailwindcss/utilities";
@import "tailwindcss/utilities";

@layer components {
.scrollbar::-webkit-scrollbar {
width: 8px;
height: 15px;
}

.scrollbar::-webkit-scrollbar-track {
border-radius: 100vh;
background: #eeeeee;
}

.scrollbar::-webkit-scrollbar-thumb {
background: #cccccc;
border-radius: 100vh;
border: 3px solid #cccccc;
}

.scrollbar::-webkit-scrollbar-thumb:hover {
background: #bbbbbb;
border: 3px solid #bbbbbb;
}
}

0 comments on commit 57baa21

Please sign in to comment.