feat(directory): add icon before name in fast navigation
This commit is contained in:
@@ -1 +1 @@
|
|||||||
1.2.15
|
1.2.16
|
||||||
@@ -56,6 +56,13 @@ export default function Dropdown(props) {
|
|||||||
toggleDropdown()
|
toggleDropdown()
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
{
|
||||||
|
item.icon ? (
|
||||||
|
<section className={classes.item_icon}>
|
||||||
|
{item.icon}
|
||||||
|
</section>
|
||||||
|
) : null
|
||||||
|
}
|
||||||
<section className={classes.text}>{item.name}</section>
|
<section className={classes.text}>{item.name}</section>
|
||||||
</li>
|
</li>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -111,6 +111,18 @@
|
|||||||
padding: 0.5rem;
|
padding: 0.5rem;
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
transition: color cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
|
transition: color cubic-bezier(0.65, 0.05, 0.36, 1) 0.3s;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: flex-start;
|
||||||
|
align-items: center;
|
||||||
|
flex-wrap: nowrap;
|
||||||
|
|
||||||
|
.item_icon {
|
||||||
|
height: inherit;
|
||||||
|
width: 1rem;
|
||||||
|
fill: var(--text-color);
|
||||||
|
margin-right: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
&:hover,
|
&:hover,
|
||||||
&:focus,
|
&:focus,
|
||||||
|
|||||||
@@ -102,6 +102,11 @@ export default function Home() {
|
|||||||
name: item.codename[language],
|
name: item.codename[language],
|
||||||
value: item.link,
|
value: item.link,
|
||||||
type: "item",
|
type: "item",
|
||||||
|
icon: <CharIcon
|
||||||
|
type={item.type}
|
||||||
|
viewBox={
|
||||||
|
item.type === 'operator' ? '0 0 88.969 71.469' : '0 0 94.563 67.437'
|
||||||
|
} />
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user