Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/concepts/concept-1/sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export const Sidebar = ({
{menuItems.map((item) => (
<Button
onClick={handleClick}
key={item.name}
name={item.name}
icon={item.icon}
isActive={activeItem === item.name}
Expand Down
9 changes: 5 additions & 4 deletions src/sidebars/sidebar-1/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export const Sidebar = () => {
<nav className="sidebar-nav">
<NavHeader />
{menuItems.map((item) => (
<>
<div key={`a_${item.name}`}>
{!item.items && (
<NavButton
onClick={handleClick}
Expand All @@ -105,7 +105,7 @@ export const Sidebar = () => {
/>
)}
{item.items && (
<>
<div key={`b_${item.name}`}>
<NavButton
onClick={handleClick}
name={item.name}
Expand All @@ -121,14 +121,15 @@ export const Sidebar = () => {
{item.items.map((subItem) => (
<NavButton
onClick={handleClick}
key={`c_${subItem}`}
name={subItem}
isActive={activeItem === subItem}
/>
))}
</div>
</>
</div>
)}
</>
</div>
))}
</nav>
</aside>
Expand Down
3 changes: 2 additions & 1 deletion src/sidebars/sidebar-10/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ const SubMenu: FC<SubMenuProps> = ({ item, activeItem, handleClick }) => {
<div ref={navRef} className="sub-nav-inner">
{item?.items.map((subItem) => (
<NavButton
key={subItem}
onClick={handleClick}
name={subItem}
isActive={activeItem === subItem}
Expand All @@ -122,7 +123,7 @@ export const Sidebar = () => {
<aside className="sidebar">
<NavHeader />
{menuItems.map((item) => (
<div>
<div key={item.name}>
{!item.items && (
<NavButton
onClick={handleClick}
Expand Down
1 change: 1 addition & 0 deletions src/sidebars/sidebar-2/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export const Sidebar = () => {
{menuItems.map((item) => (
<Button
onClick={handleClick}
key={item.name}
name={item.name}
icon={item.icon}
isActive={activeItem === item.name}
Expand Down
9 changes: 5 additions & 4 deletions src/sidebars/sidebar-3/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ const SubMenu: FC<SubMenuProps> = ({ item, activeItem, handleClick }) => {
<NavButton
onClick={handleClick}
name={subItem}
key={subItem}
isActive={activeItem === subItem}
/>
))}
Expand All @@ -131,7 +132,7 @@ export const Sidebar = () => {
<aside className="sidebar">
<NavHeader />
{menuItems.map((item) => (
<>
<div key={item.name}>
{!item.items && (
<NavButton
onClick={handleClick}
Expand All @@ -142,7 +143,7 @@ export const Sidebar = () => {
/>
)}
{item.items && (
<>
<div key={item.name}>
<NavButton
onClick={handleClick}
name={item.name}
Expand All @@ -155,9 +156,9 @@ export const Sidebar = () => {
handleClick={handleClick}
item={item}
/>
</>
</div>
)}
</>
</div>
))}
</aside>
);
Expand Down
14 changes: 7 additions & 7 deletions src/sidebars/sidebar-4/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export const Sidebar = () => {
>
<div>
{menuItems.map((item) => (
<NavButton name={item.name} icon={item.icon} />
<NavButton key={item.name} name={item.name} icon={item.icon} />
))}
</div>
<div>
Expand All @@ -128,22 +128,22 @@ export const Sidebar = () => {
<div className="row">
<div className="switch-label">Dark Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round1" type="checkbox" />
<label htmlFor="switch-round1"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Accessibility Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round2" type="checkbox" />
<label htmlFor="switch-round2"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Quirks Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round3" type="checkbox" />
<label htmlFor="switch-round3"></label>
</span>
</div>
</form>
Expand Down
14 changes: 7 additions & 7 deletions src/sidebars/sidebar-5/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export const Sidebar = () => {
<Tab isActive={activeTab === 0}>
<div>
{menuItems.map((item) => (
<NavButton name={item.name} icon={item.icon} />
<NavButton key={item.name} name={item.name} icon={item.icon} />
))}
</div>
</Tab>
Expand Down Expand Up @@ -135,22 +135,22 @@ export const Sidebar = () => {
<div className="row">
<div className="switch-label">Dark Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round1" type="checkbox" />
<label htmlFor="switch-round1"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Accessibility Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round2" type="checkbox" />
<label htmlFor="switch-round2"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Quirks Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round3" type="checkbox" />
<label htmlFor="switch-round3"></label>
</span>
</div>
</form>
Expand Down
14 changes: 7 additions & 7 deletions src/sidebars/sidebar-7/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export const Sidebar = () => {
>
<div>
{menuItems.map((item) => (
<NavButton name={item.name} icon={item.icon} />
<NavButton key={item.name} name={item.name} icon={item.icon} />
))}
</div>
<div>
Expand All @@ -116,22 +116,22 @@ export const Sidebar = () => {
<div className="row">
<div className="switch-label">Dark Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round1" type="checkbox" />
<label htmlFor="switch-round1"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Accessibility Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round2" type="checkbox" />
<label htmlFor="switch-round2"></label>
</span>
</div>
<div className="row">
<div className="switch-label">Quirks Mode</div>
<span className="switch">
<input id="switch-round" type="checkbox" />
<label htmlFor="switch-round"></label>
<input id="switch-round3" type="checkbox" />
<label htmlFor="switch-round3"></label>
</span>
</div>
</form>
Expand Down