started workshop pages
This commit is contained in:
parent
2177e13b49
commit
82225f0b81
13 changed files with 431 additions and 5 deletions
10
website/src/components/Box.astro
Normal file
10
website/src/components/Box.astro
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
---
|
||||
import LightBulbIcon from '@heroicons/react/20/solid/LightBulbIcon';
|
||||
//import MusicalNoteIcon from '@heroicons/react/20/solid/MusicalNoteIcon';
|
||||
---
|
||||
|
||||
<div class="py-1 px-6 pr-10 bg-lineHighlight relative mb-4">
|
||||
<div><slot /></div>
|
||||
<LightBulbIcon className="w-5 h-5 absolute top-4 right-4" />
|
||||
<!-- <MusicalNoteIcon className="w-5 h-5 absolute top-4 right-4" /> -->
|
||||
</div>
|
||||
18
website/src/components/QA.tsx
Normal file
18
website/src/components/QA.tsx
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
import ChevronDownIcon from '@heroicons/react/20/solid/ChevronDownIcon';
|
||||
import ChevronUpIcon from '@heroicons/react/20/solid/ChevronUpIcon';
|
||||
import { useState } from 'react';
|
||||
|
||||
export default function QA({ children, q }) {
|
||||
const [visible, setVisible] = useState(false);
|
||||
return (
|
||||
<div className="py-4 px-6 pr-10 bg-lineHighlight relative mb-4">
|
||||
<div className="cursor-pointer" onClick={() => setVisible((v) => !v)}>
|
||||
<div>{q}</div>
|
||||
<a className="p-1 absolute top-4 right-4">
|
||||
{visible ? <ChevronUpIcon className="w-5 h-5" /> : <ChevronDownIcon className="w-5 h-5" />}
|
||||
</a>
|
||||
</div>
|
||||
{visible && <div>{children}</div>}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue