mirror of
https://github.com/roleypoly/roleypoly.git
synced 2025-06-16 09:39:09 +00:00
chore: update prettier tab width for consistency (#175)
This commit is contained in:
parent
a931f8c69c
commit
f24d2fcc99
247 changed files with 7224 additions and 7375 deletions
|
@ -3,18 +3,18 @@ import { mastheadSlugs, user } from '../../fixtures/storyData';
|
|||
import { AppShell } from './AppShell';
|
||||
|
||||
export default {
|
||||
title: 'Organisms/App Shell',
|
||||
component: AppShell,
|
||||
title: 'Organisms/App Shell',
|
||||
component: AppShell,
|
||||
};
|
||||
|
||||
export const Guest = () => (
|
||||
<AppShell showFooter user={null}>
|
||||
<h1>Hello World</h1>
|
||||
</AppShell>
|
||||
<AppShell showFooter user={null}>
|
||||
<h1>Hello World</h1>
|
||||
</AppShell>
|
||||
);
|
||||
|
||||
export const LoggedIn = () => (
|
||||
<AppShell user={user} guilds={mastheadSlugs}>
|
||||
<h1>Hello World</h1>
|
||||
</AppShell>
|
||||
<AppShell user={user} guilds={mastheadSlugs}>
|
||||
<h1>Hello World</h1>
|
||||
</AppShell>
|
||||
);
|
||||
|
|
|
@ -3,11 +3,11 @@ import { fontCSS } from '@roleypoly/design-system/atoms/fonts';
|
|||
import styled, { createGlobalStyle } from 'styled-components';
|
||||
|
||||
export const Content = styled.div<{ small?: boolean }>`
|
||||
margin: 0 auto;
|
||||
margin-top: 50px;
|
||||
width: ${(props) => (props.small ? '960px' : '1024px')};
|
||||
max-width: 98vw;
|
||||
max-height: calc(100vh - 50px);
|
||||
margin: 0 auto;
|
||||
margin-top: 50px;
|
||||
width: ${(props) => (props.small ? '960px' : '1024px')};
|
||||
max-width: 98vw;
|
||||
max-height: calc(100vh - 50px);
|
||||
`;
|
||||
|
||||
export const GlobalStyles = createGlobalStyle`
|
||||
|
|
|
@ -7,38 +7,38 @@ import { Scrollbars } from 'react-custom-scrollbars';
|
|||
import { Content, GlobalStyles } from './AppShell.styled';
|
||||
|
||||
export type AppShellProps = {
|
||||
children: React.ReactNode;
|
||||
user?: DiscordUser;
|
||||
showFooter?: boolean;
|
||||
small?: boolean;
|
||||
activeGuildId?: string | null;
|
||||
guilds?: GuildSlug[];
|
||||
recentGuilds?: string[];
|
||||
disableGuildPicker?: boolean;
|
||||
children: React.ReactNode;
|
||||
user?: DiscordUser;
|
||||
showFooter?: boolean;
|
||||
small?: boolean;
|
||||
activeGuildId?: string | null;
|
||||
guilds?: GuildSlug[];
|
||||
recentGuilds?: string[];
|
||||
disableGuildPicker?: boolean;
|
||||
};
|
||||
|
||||
export const AppShell = (props: AppShellProps) => (
|
||||
<>
|
||||
<GlobalStyles />
|
||||
<GlobalStyleColors />
|
||||
{props.user ? (
|
||||
<Masthead.Authed
|
||||
disableGuildPicker={props.disableGuildPicker}
|
||||
guilds={props.guilds || []}
|
||||
activeGuildId={props.activeGuildId || null}
|
||||
user={props.user}
|
||||
recentGuilds={props.recentGuilds || []}
|
||||
/>
|
||||
) : (
|
||||
<Masthead.Guest />
|
||||
)}
|
||||
<Scrollbars
|
||||
style={{ height: 'calc(100vh - 25px)', margin: 0, padding: 0 }}
|
||||
autoHide
|
||||
universal
|
||||
>
|
||||
<Content small={props.small}>{props.children}</Content>
|
||||
{props.showFooter && <Footer />}
|
||||
</Scrollbars>
|
||||
</>
|
||||
<>
|
||||
<GlobalStyles />
|
||||
<GlobalStyleColors />
|
||||
{props.user ? (
|
||||
<Masthead.Authed
|
||||
disableGuildPicker={props.disableGuildPicker}
|
||||
guilds={props.guilds || []}
|
||||
activeGuildId={props.activeGuildId || null}
|
||||
user={props.user}
|
||||
recentGuilds={props.recentGuilds || []}
|
||||
/>
|
||||
) : (
|
||||
<Masthead.Guest />
|
||||
)}
|
||||
<Scrollbars
|
||||
style={{ height: 'calc(100vh - 25px)', margin: 0, padding: 0 }}
|
||||
autoHide
|
||||
universal
|
||||
>
|
||||
<Content small={props.small}>{props.children}</Content>
|
||||
{props.showFooter && <Footer />}
|
||||
</Scrollbars>
|
||||
</>
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue