Skip to content

Commit d385b2c

Browse files
authored
[Chore] Remove unused components / features from docs (#30880)
1 parent d619ced commit d385b2c

6 files changed

Lines changed: 0 additions & 217 deletions

File tree

src/components/Checkbox.astro

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

src/components/Dismissible.tsx

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

src/components/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ export { default as AnimatedWorkflowDiagram } from "./AnimatedWorkflowDiagram.as
99
export { default as APIRequest } from "./APIRequest.astro";
1010
export { default as AutoconfigDiagram } from "./AutoconfigDiagram.astro";
1111
export { default as AvailableNotifications } from "./AvailableNotifications.astro";
12-
export { default as Checkbox } from "./Checkbox.astro";
1312
export { default as CompatibilityFlag } from "./CompatibilityFlag.astro";
1413
export { default as CompatibilityFlags } from "./CompatibilityFlags.astro";
1514
export { default as ComponentUsage } from "./ComponentUsage.astro";

src/components/overrides/Banner.astro

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
import type { StarlightIcon } from "@astrojs/starlight/types";
3-
import { Dismissible, Dismisser } from "../Dismissible";
43
import { Icon } from "@astrojs/starlight/components";
54
65
const { banner } = Astro.locals.starlightRoute.entry.data;
@@ -26,44 +25,6 @@ const { banner } = Astro.locals.starlightRoute.entry.data;
2625
break;
2726
}
2827

29-
if (banner.dismissible) {
30-
return (
31-
<Dismissible
32-
id={banner.dismissible.id}
33-
defaultDisplay="none"
34-
client:load
35-
>
36-
<div
37-
class={`sl-banner dismissible relative ${banner.type !== "default" ? `alert ${banner.type}` : ""}`}
38-
>
39-
<div class={`leading-6 ${icon ? "flex gap-2" : ""}`}>
40-
{icon && (
41-
<Icon name={icon} size="1.333em" class="min-w-[1.333em]" />
42-
)}
43-
<span set:html={banner.content} />
44-
</div>
45-
<Dismisser
46-
id={banner.dismissible.id}
47-
days={banner.dismissible.days}
48-
client:load
49-
>
50-
<span class="absolute top-0 right-0 bottom-0 px-4 py-3">
51-
<svg
52-
class="h-6 w-6 fill-current"
53-
role="button"
54-
xmlns="http://www.w3.org/2000/svg"
55-
viewBox="0 0 20 20"
56-
>
57-
<title>Close</title>
58-
<path d="M14.348 14.849a1.2 1.2 0 0 1-1.697 0L10 11.819l-2.651 3.029a1.2 1.2 0 1 1-1.697-1.697l2.758-3.15-2.759-3.152a1.2 1.2 0 1 1 1.697-1.697L10 8.183l2.651-3.031a1.2 1.2 0 1 1 1.697 1.697l-2.758 3.152 2.758 3.15a1.2 1.2 0 0 1 0 1.698z" />
59-
</svg>
60-
</span>
61-
</Dismisser>
62-
</div>
63-
</Dismissible>
64-
);
65-
}
66-
6728
return (
6829
<div
6930
class={`sl-banner relative ${banner.type !== "default" ? `alert ${banner.type}` : ""}`}

src/content/docs/style-guide/frontmatter/banner.mdx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -24,24 +24,6 @@ banner:
2424
---
2525
```
2626

27-
## Dismissible
28-
29-
You can make a banner dismissible (for some number of days) by adding the `dismissible` property to the banner object.
30-
31-
```mdx wrap
32-
---
33-
title: Banner
34-
description: How to display a banner at the top of the page and when to use it.
35-
banner:
36-
content: Do <strong>not</strong> use banners in the <a href="/style-guide/frontmatter/">Frontmatter</a> unless a change will cause customer application to break.
37-
dismissible:
38-
id: banner-example
39-
days: 7 # default
40-
---
41-
```
42-
43-
Any other banner with the same `dismissible_id` will be dismissed when the banner is displayed.
44-
4527
## Styles / Types
4628

4729
### Note

src/schemas/base.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,9 +87,6 @@ export const baseSchema = (_context: SchemaContext) =>
8787
.enum(["default", "note", "tip", "caution", "danger"])
8888
.optional()
8989
.default("default"),
90-
dismissible: z
91-
.object({ id: z.string(), days: z.number().optional().default(7) })
92-
.optional(),
9390
})
9491
.optional()
9592
.describe(

0 commit comments

Comments
 (0)