Skip to content

Commit

Permalink
chore: update to findable-ui v11.0.0 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fran McDade authored and Fran McDade committed Sep 26, 2024
1 parent 465901f commit d6b36f2
Show file tree
Hide file tree
Showing 10 changed files with 1,086 additions and 808 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 @@ -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 @@ -127,7 +127,7 @@ export function useSwipeInteraction(
const timeout = setTimeout(() => {
onSwipeToIndex(1);
}, swipeDelay);
return () => clearTimeout(timeout);
return (): void => clearTimeout(timeout);
}, [activeIndex, swipeDelay, 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 d6b36f2

Please sign in to comment.