From 4409e306861839c634d147a4aa0b736d63a3fa2a Mon Sep 17 00:00:00 2001 From: Drulikar Date: Wed, 15 May 2024 06:32:46 -0700 Subject: [PATCH] Fix theme and tab stories for kitchen sink --- tgui/packages/tgui/debug/KitchenSink.jsx | 6 ++++-- tgui/packages/tgui/stories/Tabs.stories.jsx | 19 +++++++++---------- tgui/packages/tgui/stories/Themes.stories.jsx | 8 +++----- 3 files changed, 16 insertions(+), 17 deletions(-) diff --git a/tgui/packages/tgui/debug/KitchenSink.jsx b/tgui/packages/tgui/debug/KitchenSink.jsx index 19044ca98d0c..f933c6dec0d1 100644 --- a/tgui/packages/tgui/debug/KitchenSink.jsx +++ b/tgui/packages/tgui/debug/KitchenSink.jsx @@ -23,7 +23,7 @@ const getStories = () => r.keys().map((path) => r(path)); export const KitchenSink = (props) => { const { panel } = props; - const [theme] = useState(null); + const [theme, setTheme] = useState(null); const [pageIndex, setPageIndex] = useState(0); const stories = getStories(); const story = stories[pageIndex]; @@ -48,7 +48,9 @@ export const KitchenSink = (props) => { - {story.meta.render()} + + {story.meta.render(theme, setTheme)} + diff --git a/tgui/packages/tgui/stories/Tabs.stories.jsx b/tgui/packages/tgui/stories/Tabs.stories.jsx index 24290fedaa25..b7c1d94c3298 100644 --- a/tgui/packages/tgui/stories/Tabs.stories.jsx +++ b/tgui/packages/tgui/stories/Tabs.stories.jsx @@ -94,41 +94,40 @@ const Story = (props) => {
- +
- + Some text
Section-less tabs appear the same as tabs in a fitted section:
- + ); }; const TabsPrefab = (props) => { const [tabIndex, setTabIndex] = useState(0); - const [tabProps] = useState({}); return ( {TAB_RANGE.map((text, i) => ( ) } rightSlot={ - tabProps.rightSlot && ( + props.tabProps.rightSlot && (