Skip to content

Commit

Permalink
refactor: Absolute Imports and Seperations into different lines
Browse files Browse the repository at this point in the history
  • Loading branch information
FAUSTMANNSTEF committed Dec 19, 2024
1 parent df23a1a commit c1debc0
Show file tree
Hide file tree
Showing 16 changed files with 70 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import CloudDownload from "@mui/icons-material/CloudDownload";
import LanguageRounded from "@mui/icons-material/LanguageRounded";
import MenuRounded from "@mui/icons-material/MenuRounded";
import IconSearch from "@mui/icons-material/Search";
import colors from "../../../theme/colors";
import colors from "theme/colors";

/**
* Storybook metadata for a button with just an icon
Expand Down
15 changes: 8 additions & 7 deletions src/components/Buttons/ZDSButton.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
import type { Meta, StoryObj } from "@storybook/react";
import { fn } from "@storybook/test";
<<<<<<< Updated upstream:src/components/Buttons/ZDSButton.stories.tsx
import Button from "./ZDSButton";
import { ReactComponent as GoogleIcon } from "../../assets/AIDA/vectors/HeaderSignInViewGoogle.svg";
=======
import Button from "./myButton";
import { ReactComponent as GoogleIcon } from "assets/vectors/jsx/HeaderSignInViewGoogle.svg";
>>>>>>> Stashed changes:src/components/Buttons/myButton.stories.tsx
import ExpandMore from "@mui/icons-material/ExpandMore";
import ExpandLess from "@mui/icons-material/ExpandLess";
import colors from "../../theme/colors";
import React, { useState } from "react";
import LogoutIcon from "@mui/icons-material/Logout";
import {
Add,
ArrowForward,
Share,
LinkedIn,
Microsoft,
} from "@mui/icons-material";
import { Add } from "@mui/icons-material";
import { ArrowForward } from "@mui/icons-material";
import { Share } from "@mui/icons-material";

/**
* Storybook metadata for the Button component
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
<<<<<<< Updated upstream:src/components/Buttons/cta-common-btn/ZDSAidaCtaCommonBtn.stories.tsx
import { ExplorerLargeCtaIcon } from "../../../assets/AIDA/jsx/ExplorerLargeCtaIcon";

import { ZDSAidaCtaCommonBtn } from ".";
=======
import { ExplorerLargeCtaIcon } from "assets/vectors/jsx/ExplorerLargeCtaIcon";
import { CtaCommonBtn } from ".";
>>>>>>> Stashed changes:src/components/buttons/cta-common-btn/CtaCommonBtn.stories.tsx
import { withRouter } from "storybook-addon-remix-react-router";

const meta = {
Expand Down
8 changes: 8 additions & 0 deletions src/components/Grids/ZDSGrantCard.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
<<<<<<< Updated upstream:src/components/Grids/ZDSGrantCard.stories.tsx
// import { withRouter } from "storybook-addon-remix-react-router";
import { ZDSGrantCard } from "./ZDSGrantCard";

const meta = {
title: "Example/Grid",
component: ZDSGrantCard,
// decorators: [withRouter],
=======
import { GrantCard } from "./GrantCard";

const meta = {
title: "Example/Grid",
component: GrantCard,
>>>>>>> Stashed changes:src/components/grids/GrantCard.stories.tsx
parameters: {
layout: "fullscreen",
},
Expand Down
4 changes: 4 additions & 0 deletions src/components/Grids/ZDSGrantCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import Box from "@mui/material/Box";
import Divider from "@mui/material/Divider";
import Typography from "@mui/material/Typography";
import LocationIcon from "@mui/icons-material/LocationOn";
<<<<<<< Updated upstream:src/components/Grids/ZDSGrantCard.tsx
import { GrantCardProps } from "./data"; // Ensure this path is correct and the file exists
=======
import { GrantCardProps } from "./data";
>>>>>>> Stashed changes:src/components/grids/GrantCard.tsx

export const ZDSGrantCard: React.FC<GrantCardProps> = (
props: GrantCardProps
Expand Down
14 changes: 6 additions & 8 deletions src/components/Menu/MuiFormControl/ZDSMuiForm.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
/** @jsxImportSource @emotion/react */
import React from "react";
import {
Select,
MenuItem,
FormControl,
SelectChangeEvent,
Typography,
SxProps,
} from "@mui/material";
import { MenuItem } from "@mui/material";
import { FormControl } from "@mui/material";
import { Select } from "@mui/material";
import { Typography } from "@mui/material";
import { SelectChangeEvent } from "@mui/material";
import { SxProps } from "@mui/material";
import { colors } from "../../../theme";

interface FormControlProps {
Expand Down
5 changes: 5 additions & 0 deletions src/components/Menu/MuiMenu/ZDSDropdown.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
<<<<<<< Updated upstream:src/components/Menu/MuiMenu/ZDSDropdown.stories.tsx
import MyDropdown from "./ZDSDropdown";
import { colors } from "../../../theme";
=======
import MyDropdown from "./myDropdown";
import { colors } from "theme";
>>>>>>> Stashed changes:src/components/Menu/MuiMenu/mydropdown.stories.tsx
import IconButton from "@mui/material/IconButton";
import MenuRounded from "@mui/icons-material/MenuRounded";
import AccountCircleIcon from "@mui/icons-material/AccountCircle";
Expand Down
5 changes: 3 additions & 2 deletions src/components/Menu/MuiMenu/ZDSDropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
/** @jsxImportSource @emotion/react */
import React from "react";
import MenuItem from "@mui/material/MenuItem";
import Menu, { MenuProps as MuiMenuProps } from "@mui/material/Menu";
import Menu from "@mui/material/Menu";
import { MenuProps as MuiMenuProps } from "@mui/material/Menu";
import { SxProps } from "@mui/material";
import { colors } from "../../../theme";
import { colors } from "theme";
import Divider from "@mui/material/Divider";

// MenuItemProps
Expand Down
6 changes: 6 additions & 0 deletions src/components/SearchInput/ZDSSearchInput.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
import React from "react";
import type { Meta, StoryObj } from "@storybook/react";
<<<<<<< Updated upstream:src/components/SearchInput/ZDSSearchInput.stories.tsx
import { ZDSSearchInput } from "./ZDSSearchInput";
import { ReactComponent as ExplorerSearchIcon } from "../../assets/OpenAid/vectors/ExplorerSearchIcon.svg";
import colors from "../../theme/colorsSeaerchInput";
=======
import { mySearchInput } from "./mySearchInput";
import { ReactComponent as ExplorerSearchIcon } from "assets/vectors/ExplorerSearchIcon.svg";
import colors from "theme/colorsSeaerchInput";
>>>>>>> Stashed changes:src/components/SearchInput/mySearchInput.stories.tsx
import { Box } from "@mui/material";
import SearchIcon from "@mui/icons-material/Search";
import ClearIcon from "@mui/icons-material/Clear";
Expand Down
2 changes: 1 addition & 1 deletion src/components/SearchInput/ZDSSearchInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import React from "react";
import InputBase from "@mui/material/InputBase";
import Box from "@mui/material/Box";
import colors from "../../theme/colorsSeaerchInput";
import colors from "theme/colorsSeaerchInput";
import { SxProps, Theme } from "@mui/material";

interface Boxprops {
Expand Down
4 changes: 3 additions & 1 deletion src/components/Tables/MuiDatagrid/ZDSDataGrid.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/** @jsxImportSource @emotion/react */
import * as React from "react";
import Box from "@mui/material/Box";
import { DataGrid, DataGridProps, GridSlotsComponent } from "@mui/x-data-grid";
import { DataGrid } from "@mui/x-data-grid";
import { DataGridProps } from "@mui/x-data-grid";
import { GridSlotsComponent } from "@mui/x-data-grid";
import { SxProps } from "@mui/system";

//Css props that can be manipulated
Expand Down
8 changes: 3 additions & 5 deletions src/components/Tables/TabulatorTables/ZDSTabulatorTable.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
/** @jsxImportSource @emotion/react */
import * as React from "react";
import Box from "@mui/material/Box";
import {
TabulatorFull as Tabulator,
ColumnDefinition,
RowComponent,
} from "tabulator-tables";
import { TabulatorFull as Tabulator } from "tabulator-tables";
import { ColumnDefinition } from "tabulator-tables";
import { RowComponent } from "tabulator-tables";
import "tabulator-tables/dist/css/tabulator.min.css";
import { SxProps } from "@mui/system";

Expand Down
9 changes: 9 additions & 0 deletions src/components/Tables/TabulatorTables/data.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<<<<<<< Updated upstream
import { appColors } from "./../../../app/theme/index";
import { formatLocale } from "./../../../app/utils/formatLocale";
import {
Expand All @@ -6,6 +7,14 @@ import {
TabulatorFull as Tabulator,
} from "tabulator-tables";
import { TableDataItem } from "./ZDSTabulatorTable";
=======
import { appColors } from "app/theme/index";
import { formatLocale } from "app/utils/formatLocale";
import { CellComponent } from "tabulator-tables";
import { ColumnDefinition } from "tabulator-tables";
import { TabulatorFull as Tabulator } from "tabulator-tables";
import { TableDataItem } from "./myTabulatorTable";
>>>>>>> Stashed changes

export const TABULATOR_BORDER_STYLES = {
BLUE: "2px solid blue",
Expand Down
2 changes: 1 addition & 1 deletion src/components/buttons/cta-common-btn/data.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import colors from "../../../theme/colors";
import colors from "theme/colors";
export interface CtaCommonBtnProps {
label: string;
text?: string;
Expand Down
8 changes: 6 additions & 2 deletions src/components/buttons/cta-common-btn/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
import React from "react";
import colors from "../../../theme/colors";
import colors from "theme/colors";
import Box from "@mui/material/Box";
import { useNavigate } from "react-router-dom";
import ButtonBase from "@mui/material/ButtonBase";
import IconButton from "@mui/material/IconButton";
import Typography from "@mui/material/Typography";
import ArrowOutward from "@mui/icons-material/ArrowOutward";
<<<<<<< Updated upstream
import { CtaCommonBtnProps, ZDSAidaCtaCommonBtnVariantStyles } from "./data";
import { Color } from "@mui/material";
=======
import { CtaCommonBtnVariantStyles } from "./data";
import { CtaCommonBtnProps } from "./data";
>>>>>>> Stashed changes

export const ZDSAidaCtaCommonBtn: React.FC<CtaCommonBtnProps> = (
props: CtaCommonBtnProps
Expand Down
1 change: 1 addition & 0 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"declaration": true,
"outDir": "dist",
"declarationDir": "dist/types",
"baseUrl": "./src",
"lib": [
"dom",
"dom.iterable",
Expand Down

0 comments on commit c1debc0

Please sign in to comment.