Membuat database menu desa: Berita & Pengummuman
This commit is contained in:
@@ -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;
|
||||
@@ -1 +0,0 @@
|
||||
export const maxLength = 2000
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user