첫 커밋
This commit is contained in:
35
src/entities/additional-service/ui/intro-list-item.tsx
Normal file
35
src/entities/additional-service/ui/intro-list-item.tsx
Normal file
@@ -0,0 +1,35 @@
|
||||
import { IntroListItemProps } from '../model/types';
|
||||
import { useNavigate } from '@/shared/lib/hooks/use-navigate';
|
||||
|
||||
export const IntroListItem = ({
|
||||
className,
|
||||
serviceName,
|
||||
serviceDesc,
|
||||
icon,
|
||||
path
|
||||
}: IntroListItemProps) => {
|
||||
const { navigate } = useNavigate();
|
||||
|
||||
const onClickToNavigate = () => {
|
||||
if(!!path){
|
||||
navigate(path);
|
||||
}
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<div
|
||||
className={ className }
|
||||
onClick={ () => onClickToNavigate() }
|
||||
>
|
||||
<div>
|
||||
<div className="service-name">{ serviceName }</div>
|
||||
<p className="service-desc">{ serviceDesc }</p>
|
||||
</div>
|
||||
<img
|
||||
src={ icon }
|
||||
alt={ serviceName }
|
||||
/>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
};
|
||||
Reference in New Issue
Block a user