chore: update prettier tab width for consistency (#175)

This commit is contained in:
41666 2021-03-13 22:54:34 -05:00 committed by GitHub
parent a931f8c69c
commit f24d2fcc99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
247 changed files with 7224 additions and 7375 deletions

View file

@ -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>
);

View file

@ -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`

View file

@ -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>
</>
);