Membuat database menu desa: Berita & Pengummuman

This commit is contained in:
2025-04-22 21:48:01 +08:00
parent 7b0fb9332e
commit 9a6f8dc7f6
27 changed files with 838 additions and 101 deletions

View File

@@ -1,12 +0,0 @@
import React from 'react';
import { Text } from '@mantine/core';
function CompTextLengh({input, maxLength}: {input: string, maxLength: number}) {
return (
<div>
<Text fz={"xs"}>{input.length}/{maxLength}</Text>
</div>
);
}
export default CompTextLengh;

View File

@@ -1 +0,0 @@
export const maxLength = 2000

View File

@@ -1,13 +1,8 @@
'use client'
import colors from '@/con/colors';
import { Box, Button, Group, Stack, Text, Textarea, Title } from '@mantine/core';
import { useState } from 'react';
import CompTextLengh from './_comp_textLengh';
import { maxLength } from './gs_maxLength';
function Page(
) {
const [value, setValue] = useState("")
function Page() {
return (
<Box>
<Stack gap={"xs"}>
@@ -15,13 +10,10 @@ function Page(
<Textarea
label={<Text>Deskripsi</Text>}
placeholder='tambah deskripsi'
maxLength={maxLength}
value={value}
onChange={(e) => setValue(e.target.value)}
/>
<CompTextLengh input={value} maxLength={maxLength}/>
<Group>
<Button bg={colors['blue-button']} fz={'md'}>Submit</Button>
<Button
bg={colors['blue-button']} fz={'md'}>Submit</Button>
</Group>
</Stack>
</Box>