import CssEditor from '@/components/css-editor'; import InputError from '@/components/input-error'; import LoadingButton from '@/components/loading-button'; import { Card, CardContent, CardDescription, CardHeader, CardTitle } from '@/components/ui/card'; import { Separator } from '@/components/ui/separator'; import { SharedData } from '@/types/global'; import { useForm, usePage } from '@inertiajs/react'; import { SystemProps } from '..'; const Style = () => { const { props } = usePage(); const { translate } = props; const { settings, button } = translate; const initialFields = props.system.fields as SystemFields; const { data, setData, post, errors, processing } = useForm({ ...(props.system.fields as SystemFields), global_style: initialFields.global_style, }); const handleSubmit = (e: React.FormEvent) => { e.preventDefault(); post(route('settings.system.update', { id: props.system.id }), { showProgress: false, preserveScroll: true, }); }; return ( {settings.custom_global_style} {settings.css_description}
{/* CSS Editor */}
{/* Fix focus area: set fixed height so editor fills the box; click-to-focus wrapper */} setData('global_style', value)} />
{button.save_changes}
); }; export default Style;