-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
refactor: Move IconComponent to shared-components #6273
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Changes from all commits
e573fa2
91aa1ef
c457038
8192609
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,13 +4,11 @@ | |
| * controlled by the `showDropdown` state, and it automatically toggles | ||
| * based on the current route. | ||
| * | ||
| * @component | ||
| * @param {InterfaceCollapsibleDropdown} props - The props for the component. | ||
| * @param {object} props.target - The target object containing the dropdown's name and sub-targets. | ||
| * @param {boolean} props.showDropdown - A boolean indicating whether the dropdown is currently visible. | ||
| * @param {React.Dispatch<React.SetStateAction<boolean>>} props.setShowDropdown - A function to toggle the dropdown's visibility. | ||
| * @param target - The target object containing the dropdown's name and sub-targets. | ||
| * @param showDropdown - A boolean indicating whether the dropdown is currently visible. | ||
| * @param setShowDropdown - A function to toggle the dropdown's visibility. | ||
| * | ||
| * @returns {JSX.Element} The collapsible dropdown component. | ||
| * @returns The collapsible dropdown component. | ||
| * | ||
| * @remarks | ||
| * - The dropdown automatically opens if the current route includes 'orgstore'. | ||
|
|
@@ -31,7 +29,7 @@ | |
| * /> | ||
| * ``` | ||
| * | ||
| * @dependencies | ||
|
Check failure on line 32 in src/components/CollapsibleDropdown/CollapsibleDropdown.tsx
|
||
| * - `react-bootstrap/Collapse` for dropdown animation. | ||
| * - `react-router-dom` for navigation and route handling. | ||
| * - `react-i18next` for internationalization support. | ||
|
|
@@ -40,7 +38,7 @@ | |
| import React, { useEffect } from 'react'; | ||
| import { Collapse } from 'react-bootstrap'; | ||
| import styles from 'style/app-fixed.module.css'; | ||
| import IconComponent from 'components/IconComponent/IconComponent'; | ||
| import IconComponent from 'shared-components/IconComponent/IconComponent'; | ||
| import { NavLink, useLocation, useNavigate } from 'react-router-dom'; | ||
| import { useTranslation } from 'react-i18next'; | ||
| import type { InterfaceCollapsibleDropdown } from 'types/DropDown/interface'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -19,11 +19,11 @@ | |
| * <EventStatsWrapper _id="12345" /> | ||
| * ``` | ||
| * | ||
| * @component | ||
|
Check failure on line 22 in src/components/EventStats/EventStatsWrapper.tsx
|
||
| * @category Event Management | ||
|
Check failure on line 23 in src/components/EventStats/EventStatsWrapper.tsx
|
||
| * @subcategory Statistics | ||
|
Check failure on line 24 in src/components/EventStats/EventStatsWrapper.tsx
|
||
| * | ||
| * @dependencies | ||
|
Check failure on line 26 in src/components/EventStats/EventStatsWrapper.tsx
|
||
| * - `react-bootstrap/Button`: For rendering the button to toggle the modal. | ||
| * - `components/IconComponent`: For displaying an icon inside the button. | ||
| * - `style/app-fixed.module.css`: For styling the button's icon wrapper. | ||
|
|
@@ -32,7 +32,7 @@ | |
| import React, { useState } from 'react'; | ||
| import { EventStats } from './Statistics/EventStats'; | ||
| import { Button } from 'react-bootstrap'; | ||
| import IconComponent from 'components/IconComponent/IconComponent'; | ||
| import IconComponent from 'shared-components/IconComponent/IconComponent'; | ||
| import styles from 'style/app-fixed.module.css'; | ||
|
|
||
| export const EventStatsWrapper = ({ _id }: { _id: string }): JSX.Element => { | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,8 +12,8 @@ | |
| * - The sidebar adapts its visibility based on the `hideDrawer` prop and viewport width. | ||
| * - **REFACTORED**: Now uses shared SidebarBase, SidebarNavItem, and SidebarPluginSection components | ||
| * | ||
| * @param {InterfaceUserSidebarProps} props - The props for the UserSidebar component. | ||
|
Check failure on line 15 in src/components/UserPortal/UserSidebar/UserSidebar.tsx
|
||
| * @param {boolean} props.hideDrawer - Determines the visibility of the sidebar. | ||
|
Check failure on line 16 in src/components/UserPortal/UserSidebar/UserSidebar.tsx
|
||
| * @param {React.Dispatch<React.SetStateAction<boolean>>} props.setHideDrawer - | ||
| * Function to update the `hideDrawer` state. | ||
| * | ||
|
|
@@ -32,7 +32,7 @@ | |
| import { usePluginDrawerItems } from 'plugin'; | ||
| import ProfileCard from 'components/ProfileCard/ProfileCard'; | ||
| import SignOut from 'components/SignOut/SignOut'; | ||
| import IconComponent from 'components/IconComponent/IconComponent'; | ||
| import IconComponent from 'shared-components/IconComponent/IconComponent'; | ||
| import SidebarBase from 'shared-components/SidebarBase/SidebarBase'; | ||
| import SidebarNavItem from 'shared-components/SidebarNavItem/SidebarNavItem'; | ||
| import SidebarPluginSection from 'shared-components/SidebarPluginSection/SidebarPluginSection'; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /** | ||
| * IconComponent type definitions | ||
| */ | ||
|
|
||
| export interface IIconComponent { | ||
| name: string; | ||
| fill?: string; | ||
| height?: string; | ||
| width?: string; | ||
| } |
Uh oh!
There was an error while loading. Please reload this page.