mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-22 22:49:45 +01:00
mobile: add borders to dialogs & sheet
This commit is contained in:
@@ -45,8 +45,8 @@ const DialogButtons = ({
|
|||||||
{
|
{
|
||||||
backgroundColor: colors.secondary.background,
|
backgroundColor: colors.secondary.background,
|
||||||
height: 60,
|
height: 60,
|
||||||
borderBottomRightRadius: 10,
|
borderBottomRightRadius: 5,
|
||||||
borderBottomLeftRadius: 10,
|
borderBottomLeftRadius: 5,
|
||||||
paddingHorizontal: 12,
|
paddingHorizontal: 12,
|
||||||
borderTopWidth: 0.7,
|
borderTopWidth: 0.7,
|
||||||
borderTopColor: getColorLinearShade(
|
borderTopColor: getColorLinearShade(
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ import DialogButtons from "./dialog-buttons";
|
|||||||
import DialogHeader from "./dialog-header";
|
import DialogHeader from "./dialog-header";
|
||||||
import { useCallback } from "react";
|
import { useCallback } from "react";
|
||||||
import { Button } from "../ui/button";
|
import { Button } from "../ui/button";
|
||||||
|
import { getContainerBorder } from "../../utils/colors";
|
||||||
|
|
||||||
export const Dialog = ({ context = "global" }) => {
|
export const Dialog = ({ context = "global" }) => {
|
||||||
const { colors } = useThemeColors();
|
const { colors } = useThemeColors();
|
||||||
@@ -121,7 +122,8 @@ export const Dialog = ({ context = "global" }) => {
|
|||||||
maxHeight: 450,
|
maxHeight: 450,
|
||||||
borderRadius: 5,
|
borderRadius: 5,
|
||||||
backgroundColor: colors.primary.background,
|
backgroundColor: colors.primary.background,
|
||||||
paddingTop: 12
|
paddingTop: 12,
|
||||||
|
...getContainerBorder(colors.primary.border, 0.5)
|
||||||
};
|
};
|
||||||
|
|
||||||
return visible ? (
|
return visible ? (
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ import { Toast } from "../../toast";
|
|||||||
import { useAppState } from "../../../hooks/use-app-state";
|
import { useAppState } from "../../../hooks/use-app-state";
|
||||||
import SettingsService from "../../../services/settings";
|
import SettingsService from "../../../services/settings";
|
||||||
import { useUserStore } from "../../../stores/use-user-store";
|
import { useUserStore } from "../../../stores/use-user-store";
|
||||||
|
import { getContainerBorder } from "../../../utils/colors";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
@@ -73,9 +74,17 @@ const SheetWrapper = ({
|
|||||||
borderTopLeftRadius: 15,
|
borderTopLeftRadius: 15,
|
||||||
alignSelf: "center",
|
alignSelf: "center",
|
||||||
borderBottomRightRadius: 0,
|
borderBottomRightRadius: 0,
|
||||||
borderBottomLeftRadius: 0
|
borderBottomLeftRadius: 0,
|
||||||
|
...getContainerBorder(colors.primary.border, 0.5),
|
||||||
|
borderBottomWidth: 0
|
||||||
};
|
};
|
||||||
}, [colors.primary.background, largeTablet, smallTablet, width]);
|
}, [
|
||||||
|
colors.primary.background,
|
||||||
|
colors.primary.border,
|
||||||
|
largeTablet,
|
||||||
|
smallTablet,
|
||||||
|
width
|
||||||
|
]);
|
||||||
|
|
||||||
const _onOpen = () => {
|
const _onOpen = () => {
|
||||||
if (lockEvents.current) return;
|
if (lockEvents.current) return;
|
||||||
|
|||||||
Reference in New Issue
Block a user