1
Fork 0
mirror of https://github.com/Steffo99/sophon.git synced 2024-12-23 07:14:21 +00:00

🔧 Make GroupCreateBox collapsible

This commit is contained in:
Steffo 2021-10-11 18:30:07 +02:00
parent 825621a558
commit 5dfcfeaa5a
Signed by: steffo
GPG key ID: 6965406171929D01

View file

@ -1,4 +1,4 @@
import {Box, Form, Heading, useFormState} from "@steffo/bluelib-react"
import {Box, Details, Form, useFormState} from "@steffo/bluelib-react"
import * as React from "react"
import {useAuthorizationContext} from "../../contexts/authorization"
import {ManagedViewSet, useManagedViewSet} from "../../hooks/useManagedViewSet"
@ -66,9 +66,11 @@ export function GroupCreateBox({viewSet}: GroupCreateBoxProps): JSX.Element | nu
return (
<Box>
<Heading level={3}>
<Details>
<Details.Summary>
Create a new group
</Heading>
</Details.Summary>
<Details.Content>
<Form>
<Form.Field label={"Name"} {...name}/>
<Form.Field label={"Slug"} disabled={true} value={slug} validity={slug.length > 0 ? true : undefined}/>
@ -93,6 +95,8 @@ export function GroupCreateBox({viewSet}: GroupCreateBoxProps): JSX.Element | nu
</Form.Button>
</Form.Row>
</Form>
</Details.Content>
</Details>
</Box>
)
}