Skip to content
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

chore: update to findable-ui v11.0.0 (#98) #103

Merged
merged 2 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading