Files
low-code-react-app-b/src/components/json-definitions/action-button.json
johndoe6345789 982fee43ac feat: migrate Tier 3 atoms batch 1 - ActionButton through Badge (8 components)
Converts 8 atom components from TSX to JSON-driven architecture:
- ActionButton: Action trigger with optional tooltip
- ActionCard: Interactive card with icon and description
- ActionIcon: Icon mapper for common actions
- Alert: Variant-based alert notifications
- AppLogo: Branding logo component
- Avatar: User profile images with fallbacks
- AvatarGroup: Grouped avatar display with overflow
- Badge: Status and count indicators

Changes:
- Created interface files for all 8 components in src/lib/json-ui/interfaces/
- Created JSON definitions in src/components/json-definitions/
- Updated json-components.ts with imports and pure JSON exports
- Updated interfaces/index.ts with new exports
- Updated json-components-registry.json to mark all as jsonCompatible

All components are stateless pure JSON implementations using createJsonComponent.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-01-21 01:32:20 +00:00

113 lines
3.0 KiB
JSON

{
"id": "action-button-root",
"type": "div",
"props": {
"className": "inline-flex"
},
"conditional": {
"if": "tooltip",
"then": {
"id": "action-button-with-tooltip",
"type": "div",
"children": [
{
"id": "action-button-tooltip-provider",
"type": "TooltipProvider",
"children": [
{
"id": "action-button-tooltip",
"type": "Tooltip",
"children": [
{
"id": "action-button-trigger",
"type": "TooltipTrigger",
"props": {
"asChild": true
},
"children": [
{
"id": "action-button-element",
"type": "Button",
"props": {
"disabled": "disabled",
"className": "className"
},
"bindings": {
"variant": "variant",
"size": "size"
},
"children": [
{
"id": "action-button-icon",
"type": "span",
"props": {
"className": "mr-2"
},
"bindings": {
"children": "icon"
},
"conditional": {
"if": "icon"
}
},
{
"id": "action-button-label",
"type": "span",
"bindings": {
"children": "label"
}
}
]
}
]
},
{
"id": "action-button-tooltip-content",
"type": "TooltipContent",
"bindings": {
"children": "tooltip"
}
}
]
}
]
}
]
},
"else": {
"id": "action-button-direct",
"type": "Button",
"props": {
"disabled": "disabled",
"className": "className"
},
"bindings": {
"variant": "variant",
"size": "size"
},
"children": [
{
"id": "action-button-icon-direct",
"type": "span",
"props": {
"className": "mr-2"
},
"bindings": {
"children": "icon"
},
"conditional": {
"if": "icon"
}
},
{
"id": "action-button-label-direct",
"type": "span",
"bindings": {
"children": "label"
}
}
]
}
}
}