Skip to content

Instantly share code, notes, and snippets.

View Big-Silver's full-sized avatar
🏠
Working from home

Senior Software Engineer Big-Silver

🏠
Working from home
View GitHub Profile
type Mutation {
register(
name: String
email: String
password: String
): User
}
type User {
id: String
@Big-Silver
Big-Silver / menu.tsx
Created June 28, 2023 08:22
Chameleon Technical exercise - Frontend Engineer
/*
Dropdown Component
The Dropdown component is a reusable React component that renders a dropdown menu with customizable items. It supports a main menu and an optional "More items" section for additional menu items.
Usage
Install the required dependencies.
Import the Dropdown component into your React application.
Use the Dropdown component in your JSX code, providing the necessary props.
Customize the menuItems array to define the items in the dropdown menu. Each menu item should have a label for display and an href for the link destination.
Customize the optional numberOfInitialMenuItems prop to specify the number of items to display in the main menu before moving the rest to the "More items" section. If the number of menu items exceeds this value, the extra items will be placed in the "More items" section.
Style the dropdown menu and its items according to your application's design.