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 Oct 1, 2024
1 parent 5347243 commit 86eeb18
Show file tree
Hide file tree
Showing 9 changed files with 1,084 additions and 806 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
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 86eeb18

Please sign in to comment.