neues Admin UI Layout eingeführt. Alle Tests auf den neusten Stand gebracht.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import React from 'react';
|
||||
import { YStack } from '@tamagui/stacks';
|
||||
import { SizableText as Text } from '@tamagui/text';
|
||||
import { useTheme } from '@tamagui/core';
|
||||
import { MobileSheet } from './Sheet';
|
||||
import { CTAButton } from './Primitives';
|
||||
import { useAdminTheme } from '../theme';
|
||||
|
||||
type Translator = (key: string, defaultValue?: string) => string;
|
||||
|
||||
@@ -37,20 +37,17 @@ export function LegalConsentSheet({
|
||||
copy,
|
||||
t,
|
||||
}: LegalConsentSheetProps) {
|
||||
const theme = useTheme();
|
||||
const { primary, border, surface, danger, text } = useAdminTheme();
|
||||
const [acceptedTerms, setAcceptedTerms] = React.useState(false);
|
||||
const [acceptedWaiver, setAcceptedWaiver] = React.useState(false);
|
||||
const [error, setError] = React.useState<string | null>(null);
|
||||
const checkboxAccent = String(theme.primary?.val ?? '#2563eb');
|
||||
const checkboxBorder = String(theme.borderColor?.val ?? '#e5e7eb');
|
||||
const checkboxSurface = String(theme.surface?.val ?? '#ffffff');
|
||||
const checkboxStyle = {
|
||||
marginTop: 4,
|
||||
width: 18,
|
||||
height: 18,
|
||||
accentColor: checkboxAccent,
|
||||
backgroundColor: checkboxSurface,
|
||||
border: `1px solid ${checkboxBorder}`,
|
||||
accentColor: primary,
|
||||
backgroundColor: surface,
|
||||
border: `1px solid ${border}`,
|
||||
borderRadius: 4,
|
||||
appearance: 'auto',
|
||||
WebkitAppearance: 'auto',
|
||||
@@ -90,7 +87,7 @@ export function LegalConsentSheet({
|
||||
footer={
|
||||
<YStack space="$2">
|
||||
{error ? (
|
||||
<Text fontSize="$sm" color="#b91c1c">
|
||||
<Text fontSize="$sm" color={danger}>
|
||||
{error}
|
||||
</Text>
|
||||
) : null}
|
||||
@@ -110,7 +107,7 @@ export function LegalConsentSheet({
|
||||
}
|
||||
>
|
||||
<YStack space="$2">
|
||||
<Text fontSize="$sm" color="#111827">
|
||||
<Text fontSize="$sm" color={text}>
|
||||
{copy?.description ?? t('events.legalConsent.description', 'Please confirm the legal notes before buying an add-on.')}
|
||||
</Text>
|
||||
{requireTerms ? (
|
||||
@@ -121,7 +118,7 @@ export function LegalConsentSheet({
|
||||
onChange={(event) => setAcceptedTerms(event.target.checked)}
|
||||
style={checkboxStyle}
|
||||
/>
|
||||
<Text fontSize="$sm" color="#111827">
|
||||
<Text fontSize="$sm" color={text}>
|
||||
{copy?.checkboxTerms ?? t(
|
||||
'events.legalConsent.checkboxTerms',
|
||||
'I have read and accept the Terms & Conditions, Privacy Policy, and Right of Withdrawal.',
|
||||
@@ -137,7 +134,7 @@ export function LegalConsentSheet({
|
||||
onChange={(event) => setAcceptedWaiver(event.target.checked)}
|
||||
style={checkboxStyle}
|
||||
/>
|
||||
<Text fontSize="$sm" color="#111827">
|
||||
<Text fontSize="$sm" color={text}>
|
||||
{copy?.checkboxWaiver ?? t(
|
||||
'events.legalConsent.checkboxWaiver',
|
||||
'I expressly request immediate provision of the digital service and understand my right of withdrawal expires once fulfilled.',
|
||||
|
||||
Reference in New Issue
Block a user