diff --git a/src/design-system/composites/LoginForm/LoginForm.module.css b/src/design-system/composites/LoginForm/LoginForm.module.css new file mode 100644 index 0000000..5c61959 --- /dev/null +++ b/src/design-system/composites/LoginForm/LoginForm.module.css @@ -0,0 +1,111 @@ +.loginForm { + display: flex; + flex-direction: column; + align-items: center; + font-family: var(--font-body); + width: 100%; +} + +.logo { + margin-bottom: 8px; +} + +.title { + font-size: 16px; + font-weight: 600; + color: var(--text-primary); + margin: 0 0 20px; +} + +.error { + width: 100%; + margin-bottom: 16px; +} + +.socialSection { + display: flex; + flex-direction: column; + gap: 8px; + width: 100%; + margin-bottom: 20px; +} + +.socialButton { + width: 100%; + justify-content: center; +} + +.divider { + display: flex; + align-items: center; + gap: 12px; + width: 100%; + margin-bottom: 20px; +} + +.dividerLine { + flex: 1; + height: 1px; + background: var(--border); +} + +.dividerText { + color: var(--text-muted); + font-size: 11px; + text-transform: uppercase; + letter-spacing: 0.5px; + font-weight: 500; +} + +.fields { + display: flex; + flex-direction: column; + gap: 14px; + width: 100%; +} + +.rememberRow { + display: flex; + justify-content: space-between; + align-items: center; +} + +.forgotLink { + font-size: 11px; + color: var(--amber); + font-weight: 500; + background: none; + border: none; + cursor: pointer; + padding: 0; + font-family: var(--font-body); +} + +.forgotLink:hover { + text-decoration: underline; +} + +.submitButton { + width: 100%; +} + +.signUpText { + text-align: center; + font-size: 12px; + color: var(--text-secondary); +} + +.signUpLink { + color: var(--amber); + font-weight: 500; + background: none; + border: none; + cursor: pointer; + padding: 0; + font-family: var(--font-body); + font-size: 12px; +} + +.signUpLink:hover { + text-decoration: underline; +} diff --git a/src/design-system/composites/LoginForm/LoginForm.test.tsx b/src/design-system/composites/LoginForm/LoginForm.test.tsx new file mode 100644 index 0000000..33a8f60 --- /dev/null +++ b/src/design-system/composites/LoginForm/LoginForm.test.tsx @@ -0,0 +1,76 @@ +import { describe, it, expect, vi } from 'vitest' +import { render, screen } from '@testing-library/react' +import { LoginForm } from './LoginForm' + +const socialProviders = [ + { label: 'Continue with Google', onClick: vi.fn() }, + { label: 'Continue with GitHub', onClick: vi.fn() }, +] + +const allProps = { + logo: