Skip to content

Commit

Permalink
fix storybook
Browse files Browse the repository at this point in the history
  • Loading branch information
sstraatemans committed Nov 5, 2024
1 parent 7908b69 commit 7936b89
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .changeset/shy-mails-punch.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ import {
import { LayoutProvider, useLayout } from './components/LayoutProvider';
import { KadenaLogo } from './components/Logo/KadenaLogo';
import { KLogo } from './components/Logo/KLogo';
import {
RightAside,
RightAsideContent,
RightAsideFooter,
RightAsideHeader,
} from './components/RightAside';
import { SideBarFooter } from './components/SideBarFooter';
import { SideBarFooterItem } from './components/SideBarFooterItem';
import { SideBarItem } from './components/SideBarItem';
Expand Down Expand Up @@ -63,7 +69,12 @@ const LinkComponent: FC<PropsWithChildren<{ to: string }>> = ({
};

const InnerLayout = () => {
const { setAppContext, isExpanded } = useLayout();
const {
setAppContext,
isExpanded,
setIsRightAsideExpanded,
isRightAsideExpanded,
} = useLayout();

useEffect(() => {
setAppContext({
Expand Down Expand Up @@ -187,7 +198,34 @@ const InnerLayout = () => {
</SideBarFooter>
}
>
<Stack style={{ maxWidth: '800px', height: '400px' }}>content</Stack>
<RightAside isOpen={isRightAsideExpanded}>
<RightAsideHeader label="test title" />
<RightAsideContent>more content</RightAsideContent>
<RightAsideFooter>
<Button
onPress={() => {
setIsRightAsideExpanded(false);
}}
>
Close
</Button>
</RightAsideFooter>
</RightAside>

<Stack
width="100%"
style={{ height: '400px' }}
justifyContent="center"
alignItems="center"
>
<Button
onPress={() => {
setIsRightAsideExpanded(true);
}}
>
open sidebar
</Button>
</Stack>
</SideBarLayout>
);
};
Expand Down

0 comments on commit 7936b89

Please sign in to comment.