misc_pterodactyl-panel/resources/scripts/components/auth/LoginFormContainer.tsx

41 lines
1 KiB
TypeScript
Raw Normal View History

2019-12-16 02:05:44 +00:00
import React, { forwardRef } from 'react';
import styled from 'styled-components';
import { Form } from 'formik';
import { breakpoint } from 'styled-components-breakpoint';
2019-06-22 20:53:41 +00:00
2019-12-16 02:05:44 +00:00
type Props = React.DetailedHTMLProps<React.FormHTMLAttributes<HTMLFormElement>, HTMLFormElement>;
const LoginContainer = styled.div`
${tw`bg-white shadow-lg rounded-lg p-6 mx-1`};
${breakpoint('sm')`
${tw`w-4/5 mx-auto`}
`};
${breakpoint('md')`
${tw`flex p-10`}
`};
${breakpoint('lg')`
${tw`w-3/5`}
`};
${breakpoint('xl')`
${tw`w-full`}
max-width: 660px;
`};
`;
2019-12-16 02:05:44 +00:00
export default forwardRef<any, Props>(({ className, ...props }, ref) => (
<Form {...props}>
<LoginContainer>
<div className={'flex-none select-none mb-6 md:mb-0 self-center'}>
<img src={'/assets/pterodactyl.svg'} className={'block w-48 md:w-64 mx-auto'}/>
</div>
<div className={'flex-1'}>
{props.children}
</div>
</LoginContainer>
</Form>
2019-12-16 02:05:44 +00:00
));