import React from 'react';
import { Button, Menu, Text } from '@mantine/core';
import { Meta, StoryObj } from '@storybook/react';
import { IUser } from '../../security/index';
import { VisynAppContext } from '../VisynAppContext';
import { VisynHeader } from './VisynHeader';
const user: IUser = {
name: 'Jaimy Smith',
roles: [],
properties: {},
};
const customerLogo = (
Customer
);
const meta: Meta = {
component: VisynHeader,
title: 'Components/VisynHeader',
args: {
components: {
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
},
},
render: (args) => {
// eslint-disable-next-line react-hooks/rules-of-hooks
const visynAppContextValue = React.useMemo(
() => ({
user,
appName: 'Demo Application',
clientConfig: {
env: 'development' as const,
},
successfulClientConfigInit: true,
successfulSentryInit: true,
}),
[],
);
return (
);
},
};
export default meta;
type Story = StoryObj;
export const Basic: Story = {
args: {
components: {
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
},
},
};
export const BurgerMenu: Story = {
args: {
components: {
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
burgerMenu: (
<>
Item AItem BItem C
>
),
},
},
};
export const CustomerLogo: Story = {
args: {
components: {
beforeRight: customerLogo,
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
customerLogo,
},
},
},
};
export const ProjectName: Story = {
args: {
components: {
center: (
Project A
),
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
},
},
};
function TabGroup() {
// const { classes } = useStyles();
/** return (
Tab 1
Tab 2
); */
return ;
}
export const Tabs: Story = {
args: {
components: {
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
afterLeft: ,
},
},
};
export const ExtendedUserMenu: Story = {
args: {
components: {
userMenu: (
<>
Page APage BPage C
>
),
},
},
};
export const ExtendedConfigurationMenu: Story = {
args: {
components: {
aboutAppModal: {
content: You can add some custom content to this about app modal. It should provide some meaningful description about the application.,
},
configurationMenu: (
<>
Item AItem BItem C
>
),
},
},
};
export const AllExtensionPoints: Story = {
args: {
components: {
title: (
),
afterLeft: (
),
beforeLeft: (
),
burgerMenu: (
<>
Item AItem BItem C
>
),
beforeCenter: (
),
center: (
),
afterCenter: (
),
beforeRight: (
),
afterRight: (
),
},
},
};