You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
import { useState } from 'react'
import { Stack , Button , Typography } from '@mui/material'
import { Home , People , List , Settings , Book } from '@mui/icons-material'
type Props = { }
function Navigation ( { } : Props ) {
const [ buttonActive , setButtonActive ] = useState < number > ( 1 ) ;
const btnNavigateClick = ( buttonID :number ) = > {
setButtonActive ( buttonID ) ;
}
return (
< Stack spacing = { 2 } padding = { 2 } justifyContent = "flex-start" bgcolor = "ButtonHighlight" textAlign = "center" borderRadius = { 2 } >
< Typography variant = 'h3' color = "primary" > М е н ю < / Typography >
< Button onClick = { ( ) = > btnNavigateClick ( 1 ) } startIcon = { < Home / > } variant = { buttonActive === 1 ? "contained" : "text" } > С т а р т < / Button >
< Button onClick = { ( ) = > btnNavigateClick ( 2 ) } startIcon = { < People / > } variant = { buttonActive === 2 ? "contained" : "text" } > К а н д и д а т ы < / Button >
< Button onClick = { ( ) = > btnNavigateClick ( 3 ) } startIcon = { < List / > } variant = { buttonActive === 3 ? "contained" : "text" } > З а я в к и < / Button >
< Button onClick = { ( ) = > btnNavigateClick ( 4 ) } startIcon = { < Book / > } variant = { buttonActive === 4 ? "contained" : "text" } > С п р а в о ч н и к и < / Button >
< Button onClick = { ( ) = > btnNavigateClick ( 5 ) } startIcon = { < Settings / > } variant = { buttonActive === 5 ? "contained" : "text" } > Н а с т р о й к и < / Button >
< / Stack >
)
} ;
export default Navigation ;