Skip to content

Commit 9ebe79f

Browse files
authored
Merge pull request #13371 from TylerAPfledderer/fix/DismissableBanner-layout
fix(Banners): fix child positioning in DismissableBanner
2 parents 48943b5 + f6ac947 commit 9ebe79f

File tree

13 files changed

+71
-70
lines changed

13 files changed

+71
-70
lines changed

.storybook/preview-head.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@
22

33
:root {
44
--font-inter: 'Inter', sans-serif;
5+
--font-mono: "IBM Plex Mono", Courier, monospace;
56
}
67

78
</style>
89

9-
<link rel="preload" href="/fonts/inter/latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
10+
<link rel="preload" href="/fonts/inter/latin.woff2" as="font" type="font/woff2" crossorigin="anonymous" />
11+
<link rel="preload" href="/fonts/ibm-plex-mono/IBMPlexMono-Regular.ttf" as="font" type="font/ttf" crossorigin="anonymous" />

src/components/BannerNotification/DismissableBanner.stories.tsx

Lines changed: 0 additions & 34 deletions
This file was deleted.

src/components/Banners/BugBountyBanner/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from "react"
33
import { Center, Text } from "@chakra-ui/react"
44

55
// Components
6-
import BannerNotification from "@/components/BannerNotification"
6+
import BannerNotification from "@/components/Banners/BannerNotification"
77

88
const BugBountyBanner = () => (
99
<BannerNotification shouldShow>

src/components/Banners/DismissableBanner/index.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { useEffect, useState } from "react"
33
import { Center, CloseButton } from "@chakra-ui/react"
44

55
// Components
6-
import BannerNotification from "@/components/BannerNotification"
6+
import BannerNotification from "../BannerNotification"
77

88
// Interface
99
export type DismissableBannerProps = {
@@ -28,9 +28,9 @@ const DismissableBanner = ({
2828
}
2929

3030
return (
31-
<BannerNotification shouldShow={show}>
32-
<Center paddingEnd={8}>{children}</Center>
33-
<CloseButton onClick={onClose} aria-label="Close Banner" />
31+
<BannerNotification shouldShow={show} gap='8'>
32+
<Center marginInlineStart='auto'>{children}</Center>
33+
<CloseButton marginInlineStart='auto' onClick={onClose} aria-label="Close Banner" />
3434
</BannerNotification>
3535
)
3636
}

src/components/UpgradeBannerNotification.tsx renamed to src/components/Banners/UpgradeBannerNotification.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { Box } from "@chakra-ui/react"
22

3+
import Emoji from "../Emoji"
4+
import InlineLink from "../Link"
5+
36
import BannerNotification from "./BannerNotification"
4-
import Emoji from "./Emoji"
5-
import InlineLink from "./Link"
67

78
const UpgradeBannerNotification = () => (
89
<BannerNotification shouldShow>

src/layouts/Docs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import {
1616
import { ChildOnlyProp } from "@/lib/types"
1717
import type { DocsFrontmatter, MdPageContent } from "@/lib/interfaces"
1818

19-
import BannerNotification from "@/components/BannerNotification"
19+
import BannerNotification from "@/components/Banners/BannerNotification"
2020
import { ButtonLink } from "@/components/Buttons"
2121
import CallToContribute from "@/components/CallToContribute"
2222
import Card from "@/components/Card"

src/layouts/UseCases.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
import type { ChildOnlyProp } from "@/lib/types"
1515
import type { MdPageContent, UseCasesFrontmatter } from "@/lib/interfaces"
1616

17-
import BannerNotification from "@/components/BannerNotification"
17+
import BannerNotification from "@/components/Banners/BannerNotification"
1818
import { List as ButtonDropdownList } from "@/components/ButtonDropdown"
1919
import Emoji from "@/components/Emoji"
2020
import FeedbackCard from "@/components/FeedbackCard"

src/lib/fonts.ts

Lines changed: 0 additions & 10 deletions
This file was deleted.

0 commit comments

Comments
 (0)