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

fix up the notification banner border and padding and other stuff #136

Open
wants to merge 1 commit into
base: redesign
Choose a base branch
from
Open
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
5 changes: 3 additions & 2 deletions app/(dashboard)/home/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import BalanceWidget from '@/app/components/BalanceWidget';
import RecentPaymentsWidget from '@/app/components/RecentPaymentsWidget';
import MonthToDateWidget from '@/app/components/MonthToDateWidget';
import CustomersWidget from '@/app/components/CustomersWidget';
import NotificationBannerContainer from '@/app/components/NotificationBannerContainer';
import EmbeddedComponentContainer from '@/app/components/EmbeddedComponentContainer';
import {ConnectNotificationBanner} from '@stripe/react-connect-js';
import {useSession} from 'next-auth/react';
Expand All @@ -20,11 +21,11 @@ export default function Dashboard() {
return (
<>
<h1 className="text-3xl font-bold">Woof woof, {name}!</h1>
<div className="bg-white">
<NotificationBannerContainer>
<EmbeddedComponentContainer>
<ConnectNotificationBanner />
</EmbeddedComponentContainer>
</div>
</NotificationBannerContainer>
<div className="flex flex-row items-start space-x-5">
<div className="min-w-[700px] flex-1">
<Schedule />
Expand Down
6 changes: 4 additions & 2 deletions app/(dashboard)/settings/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
} from '@stripe/react-connect-js';
import Container from '@/app/components/Container';
import EmbeddedComponentContainer from '@/app/components/EmbeddedComponentContainer';
import NotificationBannerContainer from '@/app/components/NotificationBannerContainer';
import {useSession} from 'next-auth/react';
import EditAccountButton from '@/app/components/EditAccountButton';
import {Link} from '@/components/ui/link';
Expand All @@ -16,6 +17,7 @@ import {LoaderCircle, Plus} from 'lucide-react';

export default function Settings() {
const {data: session} = useSession();
const enableBorder = false;
const [showPassword, setShowPassword] = React.useState(false);
const [buttonLoading, setButtonLoading] = React.useState(false);
const email = session?.user.email;
Expand Down Expand Up @@ -43,11 +45,11 @@ export default function Settings() {

return (
<>
<Container>
<NotificationBannerContainer>
<EmbeddedComponentContainer>
<ConnectNotificationBanner />
</EmbeddedComponentContainer>
</Container>
</NotificationBannerContainer>
<Container>
<div className="flex flex-row justify-between">
<h1 className="mb-4 text-xl font-semibold">Details</h1>
Expand Down
2 changes: 1 addition & 1 deletion app/components/EmbeddedComponentContainer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const EmbeddedComponentContainer = ({

return (
<div
className={`${enableBorder ? 'rounded-lg border-2 border-dashed border-[#7F81FA] p-[4px]' : 'p-[6px]'} transition-border duration-200`}
className={`${enableBorder ? 'rounded-lg border-2 border-dashed border-[#7F81FA] p-[6px] pb-[10px]' : 'p-[6px]'} transition-border duration-200`}
>
{children}
</div>
Expand Down
19 changes: 19 additions & 0 deletions app/components/NotificationBannerContainer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import {useEmbeddedComponentBorder} from '@/app/hooks/EmbeddedComponentBorderProvider';

const NotificationBannerContainer = ({
children,
}: {
children: React.ReactNode;
}) => {
const {enableBorder} = useEmbeddedComponentBorder();

return (
<div
className={`rounded-md border bg-white ${enableBorder ? 'p-[6px]' : ' p-[8px] pb-[12px]'}`}
>
{children}
</div>
);
};

export default NotificationBannerContainer;
1 change: 1 addition & 0 deletions app/hooks/useConnect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export const useConnect = (demoOnboarding: boolean) => {
fontFamily: 'Sohne, inherit',

colorPrimary: '#27AE60',
colorBackground: '#FFFFFF',

buttonPrimaryColorBackground: '#27AE60',
buttonPrimaryColorText: '#f4f4f5',
Expand Down