style : update project
Deskripsi: - add view create project - add view filter project No issue
This commit is contained in:
10
src/module/project/view/view_create_project.tsx
Normal file
10
src/module/project/view/view_create_project.tsx
Normal file
@@ -0,0 +1,10 @@
|
||||
import React from 'react';
|
||||
|
||||
export default function ViewCreateProject() {
|
||||
return (
|
||||
<div>
|
||||
ViewCreateProject
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
73
src/module/project/view/view_filter_project.tsx
Normal file
73
src/module/project/view/view_filter_project.tsx
Normal file
@@ -0,0 +1,73 @@
|
||||
'use client'
|
||||
import { LayoutNavbarNew, WARNA } from '@/module/_global';
|
||||
import { Box, Button, Divider, Group, Text } from '@mantine/core';
|
||||
import React, { useState } from 'react';
|
||||
import { FaCheck } from "react-icons/fa6";
|
||||
|
||||
const dataFilter = [
|
||||
{
|
||||
id: 1,
|
||||
name: 'Semua Proyek'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'Proyek Dinas'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'Proyek Lpd'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'Proyek Lembaga 1'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'Proyek Lembaga 2'
|
||||
},
|
||||
{
|
||||
id: 1,
|
||||
name: 'Proyek Lembaga 3'
|
||||
},
|
||||
]
|
||||
|
||||
|
||||
export default function ProjectFilter() {
|
||||
const [selectedFilter, setSelectedFilter] = useState<string | null>(null);
|
||||
|
||||
const handleFilterClick = (filterName: string) => {
|
||||
setSelectedFilter(filterName);
|
||||
};
|
||||
|
||||
return (
|
||||
<Box>
|
||||
<LayoutNavbarNew back='/project' title='Filter' menu />
|
||||
<Box p={20}>
|
||||
{dataFilter.map((filter) => (
|
||||
<Box key={filter.id}>
|
||||
<Group
|
||||
justify="space-between"
|
||||
align="center"
|
||||
mb={10}
|
||||
onClick={() => handleFilterClick(filter.name)}
|
||||
>
|
||||
<Text fw={selectedFilter === filter.name ? 'bold' : 'normal'}>
|
||||
{filter.name}
|
||||
</Text>
|
||||
{selectedFilter === filter.name && <FaCheck size={25} />}
|
||||
</Group>
|
||||
<Divider my={"sm"} />
|
||||
</Box>
|
||||
))}
|
||||
<Button
|
||||
fullWidth
|
||||
radius={100}
|
||||
size="lg"
|
||||
color={WARNA.biruTua}
|
||||
>
|
||||
Terapkan
|
||||
</Button>
|
||||
</Box>
|
||||
</Box>
|
||||
);
|
||||
}
|
||||
@@ -1,9 +1,10 @@
|
||||
import React from 'react';
|
||||
import NavbarProject from '../components/ui/navbar_project';
|
||||
|
||||
export default function ViewProject() {
|
||||
return (
|
||||
<div>
|
||||
ViewProject
|
||||
<NavbarProject/>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user