Files
2026-03-03 14:29:28 +02:00

51 lines
2.1 KiB
JSON

{
"name": "LegalSection",
"description": "Legal content page for privacy policies, terms of service, and similar documents.",
"details": "Renders a structured legal document with a title, optional subtitle, and content sections. Each section has a heading and a content array that supports paragraphs, bullet lists, and numbered lists in any combination. Layout prop controls padding: 'page' adds top page padding for navbar offset, 'section' uses standard section padding. Content is constrained to half-width on desktop for readability.",
"constraints": {
"textRules": {
"title": {
"required": true,
"example": "Privacy Policy",
"minChars": 2,
"maxChars": 100
},
"subtitle": {
"required": false,
"example": "Last updated: January 15, 2025",
"minChars": 2,
"maxChars": 200
},
"sections[].heading": {
"required": true,
"example": "1. Information We Collect",
"minChars": 2,
"maxChars": 200
}
}
},
"propsSchema": {
"layout": "'page' | 'section'",
"title": "string",
"subtitle?": "string",
"sections": "LegalContentSection[] - { heading: string; content: LegalContentItem[] } where LegalContentItem = { type: 'paragraph'; text: string } | { type: 'list'; items: string[] } | { type: 'numbered-list'; items: string[] }",
"className?": "string",
"titleClassName?": "string",
"subtitleClassName?": "string",
"sectionClassName?": "string",
"headingClassName?": "string",
"contentClassName?": "string",
"listClassName?": "string"
},
"usageExample": "<LegalSection layout=\"page\" title=\"Privacy Policy\" subtitle=\"Last updated: January 15, 2025\" sections={[{ heading: '1. Information We Collect', content: [{ type: 'paragraph', text: 'We collect information you provide directly to us.' }, { type: 'list', items: ['Name and email', 'Payment info', 'Usage data'] }, { type: 'paragraph', text: 'We also collect data automatically.' }] }]} />",
"do": [
"Use for general use"
],
"dont": [],
"editRules": {
"textOnly": true,
"layoutLocked": true,
"styleLocked": true
}
}