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

@ -4,16 +4,16 @@ import { user } from '../../fixtures/storyData';
import { UserAvatarGroup } from './UserAvatarGroup';
export default {
title: 'Molecules/User Avatar Group',
component: UserAvatarGroup,
args: {
user,
preventCollapse: true,
},
title: 'Molecules/User Avatar Group',
component: UserAvatarGroup,
args: {
user,
preventCollapse: true,
},
};
export const Default = (args) => (
<Hero>
<UserAvatarGroup {...args} />
</Hero>
<Hero>
<UserAvatarGroup {...args} />
</Hero>
);

View file

@ -3,27 +3,27 @@ import { palette } from '@roleypoly/design-system/atoms/colors';
import styled, { css } from 'styled-components';
export const Collapse = styled.div<{ preventCollapse: boolean }>`
${(props) =>
!props.preventCollapse &&
onSmallScreen(css`
display: none;
`)}
${(props) =>
!props.preventCollapse &&
onSmallScreen(css`
display: none;
`)}
`;
export const Group = styled.div`
display: flex;
align-items: center;
justify-content: flex-end;
white-space: nowrap;
display: flex;
align-items: center;
justify-content: flex-end;
white-space: nowrap;
`;
export const Discriminator = styled.span`
color: ${palette.taupe500};
font-size: 75%;
padding: 0 5px;
color: ${palette.taupe500};
font-size: 75%;
padding: 0 5px;
`;
export const GroupText = styled.span`
position: relative;
top: -2px;
position: relative;
top: -2px;
`;

View file

@ -4,25 +4,25 @@ import * as React from 'react';
import { Collapse, Discriminator, Group, GroupText } from './UserAvatarGroup.styled';
type Props = {
user: DiscordUser;
preventCollapse?: boolean;
user: DiscordUser;
preventCollapse?: boolean;
};
export const UserAvatarGroup = (props: Props) => (
<Group>
<Collapse preventCollapse={props.preventCollapse || false}>
<GroupText>
{props.user.username}
<Discriminator>#{props.user.discriminator}</Discriminator>
</GroupText>
&nbsp;
</Collapse>
<Avatar
size={34}
hash={props.user.avatar}
src={utils.avatarHash(props.user.id, props.user.avatar, 'avatars')}
>
{utils.initialsFromName(props.user.username)}
</Avatar>
</Group>
<Group>
<Collapse preventCollapse={props.preventCollapse || false}>
<GroupText>
{props.user.username}
<Discriminator>#{props.user.discriminator}</Discriminator>
</GroupText>
&nbsp;
</Collapse>
<Avatar
size={34}
hash={props.user.avatar}
src={utils.avatarHash(props.user.id, props.user.avatar, 'avatars')}
>
{utils.initialsFromName(props.user.username)}
</Avatar>
</Group>
);