mirror of
https://github.com/Steffo99/sophon.git
synced 2025-01-08 23:09:47 +00:00
Stefano Pigozzi
b44f7b4ebf
* ✨ Create Dockerfile for the backend * 🔧 Limit the allowed slug values * ✨ Create docker image for the proxy * ✨ Add serve script (and serve dependency) * ✨ Add .dockerignore symlinks to .gitignore * ✨ Create docker image for the frontend * 🔧 Proxy the frontend * 🔧 Configure the proxy.dbm directory * 🚧 WIP * 💥 Improve settings handling * 💥 Prepare backend for docker deployment * 🔧 Reserve `static` notebook slug * ✨ Make static work * 🐛 Set a default value for reduce * 💥 Things * 💥 Everything works!
37 lines
1.1 KiB
TypeScript
37 lines
1.1 KiB
TypeScript
import {IconDefinition} from "@fortawesome/fontawesome-svg-core"
|
|
import {FontAwesomeIcon} from "@fortawesome/react-fontawesome"
|
|
import {Box, Heading, Idiomatic} from "@steffo/bluelib-react"
|
|
import * as React from "react"
|
|
import ReactMarkdown from "react-markdown"
|
|
import {Empty} from "./Empty"
|
|
|
|
|
|
export interface DescriptionBoxProps {
|
|
icon: IconDefinition,
|
|
name: string,
|
|
description?: string | null,
|
|
}
|
|
|
|
|
|
export function DescriptionBox({icon, name, description}: DescriptionBoxProps): JSX.Element {
|
|
return React.useMemo(
|
|
() => (
|
|
<Box>
|
|
<Heading level={3}>
|
|
<FontAwesomeIcon icon={icon}/> About <Idiomatic>{name}</Idiomatic>
|
|
</Heading>
|
|
{
|
|
description ?
|
|
<ReactMarkdown>
|
|
{description}
|
|
</ReactMarkdown>
|
|
:
|
|
<Empty>
|
|
This resource has no about text.
|
|
</Empty>
|
|
}
|
|
</Box>
|
|
),
|
|
[icon, name, description],
|
|
)
|
|
}
|