mirror of
https://github.com/umami-software/umami.git
synced 2026-02-23 22:15:35 +01:00
Boards components.
Some checks failed
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled
Some checks failed
Node.js CI / build (postgresql, 18.18, 10) (push) Has been cancelled
This commit is contained in:
parent
7edddf15a7
commit
a39ebffd8b
20 changed files with 450 additions and 33 deletions
43
src/app/(main)/boards/[boardId]/BoardHeader.tsx
Normal file
43
src/app/(main)/boards/[boardId]/BoardHeader.tsx
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
import { Button, Column, Grid, InlineEditField, Row } from '@umami/react-zen';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
|
||||
export function BoardHeader() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
const defaultName = formatMessage(labels.untitled);
|
||||
const name = 'My Board';
|
||||
const description = 'This is my board';
|
||||
|
||||
const handleNameChange = (name: string) => {
|
||||
//updateReport({ name: name || defaultName });
|
||||
};
|
||||
|
||||
const handleDescriptionChange = (description: string) => {
|
||||
//updateReport({ description });
|
||||
};
|
||||
|
||||
return (
|
||||
<Grid columns="1fr 1fr">
|
||||
<Column>
|
||||
<Row>
|
||||
<InlineEditField
|
||||
name="name"
|
||||
value={name}
|
||||
placeholder={defaultName}
|
||||
onCommit={handleNameChange}
|
||||
/>
|
||||
</Row>
|
||||
<Row>
|
||||
<InlineEditField
|
||||
name="description"
|
||||
value={description}
|
||||
placeholder={`+ ${formatMessage(labels.addDescription)}`}
|
||||
onCommit={handleDescriptionChange}
|
||||
/>
|
||||
</Row>
|
||||
</Column>
|
||||
<Row justifyContent="flex-end">
|
||||
<Button variant="primary">{formatMessage(labels.save)}</Button>
|
||||
</Row>
|
||||
</Grid>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue