Skip to content

Commit

Permalink
Merge pull request #103 from galaxyproject/fran/98-findable
Browse files Browse the repository at this point in the history
chore: update to findable-ui v11.0.0 (#98)
  • Loading branch information
hunterckx authored Oct 1, 2024
2 parents 5347243 + b1d7dfa commit 3d993dc
Show file tree
Hide file tree
Showing 11 changed files with 1,087 additions and 809 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function useIntersectionObserver(
if (ref.current?.lastElementChild) {
observerRef.current.observe(ref.current.lastElementChild);
}
return () => {
return (): void => {
observerRef.current?.disconnect();
};
}, [onIntersection, ref]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import { css } from "@emotion/react";
import styled from "@emotion/styled";
import { IconButton as MIconButton } from "@mui/material";
import {
SwipeAction,
SWIPE_ACTION,
SwipeAction,
} from "../../../../../../../../../../hooks/useSwipeInteraction/common/entities";
import { MAX_DECK_SIZE } from "../../common/constants";
import { getArrowTransform } from "../../common/utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { HeroTitle as Typography } from "@databiosphere/findable-ui/src/componen
import { ReactNode } from "react";
import { BackButton } from "./components/BackButton/backButton";
import {
DetailViewHero as DetailViewHeroLayout,
DetailViewHeroHeadline,
DetailViewHero as DetailViewHeroLayout,
HeroHeader,
HeroTitle,
Titles,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { CustomSVGIconProps } from "@databiosphere/findable-ui/lib/components/common/CustomIcon/common/entities";
import {
ButtonGroupProps as MButtonGroupProps,
ButtonProps,
ButtonGroupProps as MButtonGroupProps,
} from "@mui/material";

export const BUTTON_PROPS: Partial<ButtonProps> = {
Expand Down
4 changes: 2 additions & 2 deletions app/hooks/useSwipeInteraction/useSwipeInteraction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
DEFAULT_ACTIVE_INDEX,
DEFAULT_SWIPE_COORDINATES,
} from "./common/constants";
import { SwipeAction, SwipeCoordinates, SWIPE_ACTION } from "./common/entities";
import { SWIPE_ACTION, SwipeAction, SwipeCoordinates } from "./common/entities";

export interface InteractiveAction {
onMouseDown: (mouseEvent: MouseEvent) => void;
Expand Down Expand Up @@ -138,7 +138,7 @@ export function useSwipeInteraction(
const timeout = setTimeout(() => {
onSwipeToIndex(1);
}, interactiveDelay);
return () => clearTimeout(timeout);
return (): void => clearTimeout(timeout);
}, [activeIndex, interactiveDelay, onSwipeToIndex]);

if (!swipeEnabled) {
Expand Down
13 changes: 13 additions & 0 deletions app/theme/common/components.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { black08 } from "@databiosphere/findable-ui/lib/theme/common/palette";
import { TEXT_BODY_LARGE_400_2_LINES } from "@databiosphere/findable-ui/lib/theme/common/typography";
import { Components, Theme } from "@mui/material";

Expand Down Expand Up @@ -27,6 +28,18 @@ export const MuiButton = (theme: Theme): Components["MuiButton"] => {
};
};

export const MuiButtonGroup = (theme: Theme): Components["MuiButtonGroup"] => {
return {
styleOverrides: {
grouped: {
"&.MuiButton-containedSecondary": {
boxShadow: `inset 0 0 0 1px ${theme.palette.smoke.dark}, 0 1px 0 0 ${black08}`,
},
},
},
};
};

/**
* MuiCssBaseline Component
* @param theme - Theme.
Expand Down
8 changes: 4 additions & 4 deletions app/theme/common/palette.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { PaletteColor } from "@mui/material";
/**
* Palette "Hero"
*/
enum HERO {
LIGHT = "#28285B",
MAIN = "#28285B",
}
export const HERO = {
LIGHT: "#28285B",
MAIN: "#28285B",
};

/**
* Color constants
Expand Down
1 change: 1 addition & 0 deletions app/theme/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export function mergeAppTheme(
const appTheme = createTheme(baseAppTheme, {
components: {
MuiButton: C.MuiButton(baseAppTheme),
MuiButtonGroup: C.MuiButtonGroup(baseAppTheme),
MuiCssBaseline: C.MuiCssBaseline(baseAppTheme),
},
});
Expand Down
2 changes: 1 addition & 1 deletion next-env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
/// <reference types="next/navigation-types/compat/navigation" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
// see https://nextjs.org/docs/app/building-your-application/configuring/typescript for more information.
Loading

0 comments on commit 3d993dc

Please sign in to comment.