chore: restructure project into yarn workspaces, remove next

This commit is contained in:
41666 2021-03-09 23:25:16 -05:00
parent 49e308507e
commit 8d06327c03
266 changed files with 16466 additions and 3350 deletions

View file

@ -0,0 +1,33 @@
import * as React from 'react';
import styled from 'styled-components';
import { guild } from '../../fixtures/storyData';
import { Preauth } from './Preauth';
export default {
title: 'Organisms/Preauth',
component: Preauth,
};
const Center = styled.div`
margin: 0 auto;
`;
export const NoSlug = ({ onSendSecretCode }) => {
return (
<Center>
<Preauth botName="roleypoly#3266" onSendSecretCode={onSendSecretCode} />
</Center>
);
};
export const WithSlug = ({ onSendSecretCode }) => {
return (
<Center>
<Preauth
botName="roleypoly#3266"
guildSlug={guild}
onSendSecretCode={onSendSecretCode}
/>
</Center>
);
};

View file

@ -0,0 +1,50 @@
import { Button } from '@roleypoly/design-system/atoms/button';
import { PreauthGreeting } from '@roleypoly/design-system/molecules/preauth-greeting';
import * as React from 'react';
import { FaDiscord } from 'react-icons/fa';
import styled from 'styled-components';
import { GuildSlug } from '../../../../src/common/types';
export type PreauthProps = {
guildSlug?: GuildSlug;
onSendSecretCode: (code: string) => void;
botName?: string;
discordOAuthLink?: string;
};
const Centered = styled.div`
text-align: center;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
max-width: 90vw;
margin: 0 auto;
`;
const WidthContainer = styled.div`
width: 20em;
max-width: 90vw;
`;
export const Preauth = (props: PreauthProps) => {
return (
<Centered>
{props.guildSlug && <PreauthGreeting guildSlug={props.guildSlug} />}
<WidthContainer>
<a href={props.discordOAuthLink || '#'}>
<Button
color="discord"
icon={
<div style={{ position: 'relative', top: 3 }}>
<FaDiscord />
</div>
}
>
Sign in with Discord
</Button>
</a>
</WidthContainer>
</Centered>
);
};

View file

@ -0,0 +1 @@
export * from './Preauth';