chore(org): Move github components out of shared
This commit is contained in:
parent
50b6747584
commit
3da46fb672
7 changed files with 137 additions and 88 deletions
46
sites/org/components/github/design-picker.mjs
Normal file
46
sites/org/components/github/design-picker.mjs
Normal file
|
@ -0,0 +1,46 @@
|
|||
import { collection } from 'shared/hooks/use-design.mjs'
|
||||
|
||||
export const DesignPicker = ({ designs = [], setDesigns }) => {
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-row items-center gap-1 flex-wrap mb-4">
|
||||
{designs.length > 0 && (
|
||||
<>
|
||||
<b>Featured:</b>
|
||||
{designs.map((d) => (
|
||||
<button
|
||||
key={d}
|
||||
className="btn btn-sm btn-success hover:btn-error capitalize"
|
||||
onClick={() => setDesigns(designs.filter((des) => d !== des))}
|
||||
>
|
||||
{d}
|
||||
</button>
|
||||
))}
|
||||
<button
|
||||
className="btn btn-sm btn-warning hover:btn-error capitalize"
|
||||
onClick={() => setDesigns([])}
|
||||
>
|
||||
Clear All
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</div>
|
||||
<div className="flex flex-row items-center gap-1 flex-wrap">
|
||||
<b>Not featured:</b>
|
||||
{collection
|
||||
.filter((d) => designs.includes(d) === false)
|
||||
.map((d, i) => (
|
||||
<button
|
||||
key={d}
|
||||
className="btn btn-sm btn-neutral btn-outline hover:btn-success capitalize"
|
||||
onClick={() => setDesigns([...designs, d])}
|
||||
>
|
||||
{d}
|
||||
</button>
|
||||
))}
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
|
||||
return <p>Design picker here</p>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue