- Updated content collections to include new schemas for better document handling. - Added new documentation files for comparisons, customization, and internationalization. - Introduced a manual installation guide and improved markdown support. - Updated package.json with new dependencies for enhanced functionality. - Added new images for documentation and improved layout components for better user experience. - Adjusted TypeScript configurations for better path management.
26 lines
673 B
TypeScript
26 lines
673 B
TypeScript
'use client';
|
|
|
|
import { buttonVariants } from '@/components/ui/button';
|
|
import { cn } from '@/lib/utils';
|
|
import { type ReactElement, useState } from 'react';
|
|
|
|
export function WidthTrigger(): ReactElement {
|
|
const [enabled, setEnabled] = useState(false);
|
|
|
|
return (
|
|
<button
|
|
type="button"
|
|
className={cn(buttonVariants({ variant: 'secondary' }))}
|
|
onClick={() => {
|
|
setEnabled((prev) => !prev);
|
|
}}
|
|
>
|
|
{enabled ? <style>{`:root { --fd-layout-width: 1400px; }`}</style> : null}
|
|
Trigger Width:
|
|
<span className="ms-1.5 text-fd-muted-foreground">
|
|
{enabled ? '1400px' : 'default'}
|
|
</span>
|
|
</button>
|
|
);
|
|
}
|