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 styles from './sidebar-item.module.scss' ;
import Button from "../button/button" ;
/* eslint-disable-next-line */
export interface SidebarItemProps {
name : string
percent : number | string
weight : number | string
href : string
}
export function SidebarItem() {
const obj : SidebarItemProps [ ] = [
{
name : "Дерево" ,
href : "some" ,
percent : "10%" ,
weight : 200
} ,
{
name : "Металл" ,
href : "some" ,
percent : "10%" ,
weight : 200
} ,
{
name : "Пластик" ,
href : "some" ,
percent : "10%" ,
weight : 200
} ,
{
name : "Стекло" ,
href : "some" ,
percent : "10%" ,
weight : 200
}
]
return (
< >
{ obj . map ( ( item , i ) = > (
< div className = { styles . item } key = { i * 2 } >
< div className = { styles . heading } >
< p className = { styles . text } >
{ item . name }
< / p >
< p className = { styles . percent } >
{ item . percent }
< / p >
< / div >
< span className = { styles . line } > < / span >
< div className = { styles . info } >
< p > { item . weight } < / p >
< span > Т о н н < / span >
< Button link = { "some" } className = { styles . link } > А н а л и т и к а < / Button >
< / div >
< / div >
) ) }
< / >
) ;
}
export default SidebarItem ;