mirror of
https://github.com/Steffo99/sophon.git
synced 2024-12-23 15:24:21 +00:00
36 lines
1 KiB
TypeScript
36 lines
1 KiB
TypeScript
|
import {faBook} from "@fortawesome/free-solid-svg-icons"
|
||
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
|
||
|
import * as React from "react"
|
||
|
import {ManagedResource} from "../../hooks/useManagedViewSet"
|
||
|
import {SophonNotebook} from "../../types/SophonTypes"
|
||
|
import {Link} from "../elements/Link"
|
||
|
import {ResourcePanel} from "../elements/ResourcePanel"
|
||
|
|
||
|
|
||
|
export interface NotebookResourcePanelProps {
|
||
|
resource: ManagedResource<SophonNotebook>,
|
||
|
}
|
||
|
|
||
|
|
||
|
export function NotebookResourcePanel({resource}: NotebookResourcePanelProps): JSX.Element {
|
||
|
|
||
|
return (
|
||
|
<ResourcePanel>
|
||
|
<ResourcePanel.Icon>
|
||
|
<FontAwesomeIcon icon={faBook}/>
|
||
|
</ResourcePanel.Icon>
|
||
|
<ResourcePanel.Name>
|
||
|
<Link href={`n/${resource.value.slug}/`}>
|
||
|
{resource.value.name}
|
||
|
</Link>
|
||
|
</ResourcePanel.Name>
|
||
|
<ResourcePanel.Text>
|
||
|
|
||
|
</ResourcePanel.Text>
|
||
|
<ResourcePanel.Buttons>
|
||
|
|
||
|
</ResourcePanel.Buttons>
|
||
|
</ResourcePanel>
|
||
|
)
|
||
|
}
|