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()
|
||||
}}
|
||||
>
|
||||
{
|
||||
item.icon ? (
|
||||
<section className={classes.item_icon}>
|
||||
{item.icon}
|
||||
</section>
|
||||
) : null
|
||||
}
|
||||
<section className={classes.text}>{item.name}</section>
|
||||
</li>
|
||||
)
|
||||
|
||||
@@ -111,6 +111,18 @@
|
||||
padding: 0.5rem;
|
||||
font-size: 1rem;
|
||||
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,
|
||||
&:focus,
|
||||
|
||||
@@ -102,6 +102,11 @@ export default function Home() {
|
||||
name: item.codename[language],
|
||||
value: item.link,
|
||||
type: "item",
|
||||
icon: <CharIcon
|
||||
type={item.type}
|
||||
viewBox={
|
||||
item.type === 'operator' ? '0 0 88.969 71.469' : '0 0 94.563 67.437'
|
||||
} />
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -252,7 +257,7 @@ function VoiceSwitchElement({ src, replay, handleAduioStateChange }) {
|
||||
}, [voiceOn, setExtraArea, setVoiceOn])
|
||||
|
||||
return (
|
||||
<VoiceElement
|
||||
<VoiceElement
|
||||
src={src}
|
||||
replay={replay}
|
||||
handleAduioStateChange={handleAduioStateChange}
|
||||
|
||||
Reference in New Issue
Block a user