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:
parent
825621a558
commit
5dfcfeaa5a
1 changed files with 32 additions and 28 deletions
|
@ -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 * as React from "react"
|
||||||
import {useAuthorizationContext} from "../../contexts/authorization"
|
import {useAuthorizationContext} from "../../contexts/authorization"
|
||||||
import {ManagedViewSet, useManagedViewSet} from "../../hooks/useManagedViewSet"
|
import {ManagedViewSet, useManagedViewSet} from "../../hooks/useManagedViewSet"
|
||||||
|
@ -66,9 +66,11 @@ export function GroupCreateBox({viewSet}: GroupCreateBoxProps): JSX.Element | nu
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box>
|
<Box>
|
||||||
<Heading level={3}>
|
<Details>
|
||||||
|
<Details.Summary>
|
||||||
Create a new group
|
Create a new group
|
||||||
</Heading>
|
</Details.Summary>
|
||||||
|
<Details.Content>
|
||||||
<Form>
|
<Form>
|
||||||
<Form.Field label={"Name"} {...name}/>
|
<Form.Field label={"Name"} {...name}/>
|
||||||
<Form.Field label={"Slug"} disabled={true} value={slug} validity={slug.length > 0 ? true : undefined}/>
|
<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.Button>
|
||||||
</Form.Row>
|
</Form.Row>
|
||||||
</Form>
|
</Form>
|
||||||
|
</Details.Content>
|
||||||
|
</Details>
|
||||||
</Box>
|
</Box>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue