UNPKG

@copilotkit/a2ui-renderer

Version:

A2UI Renderer for CopilotKit - render A2UI surfaces in React applications

1 lines 1.69 kB
{"version":3,"file":"Divider.mjs","names":[],"sources":["../../../../../../src/react-renderer/a2ui-react/catalog/basic/components/Divider.tsx"],"sourcesContent":["/**\n * Copyright 2026 Google LLC\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\n\nimport React from \"react\";\nimport { createReactComponent } from \"../../../adapter\";\nimport { DividerApi } from \"@a2ui/web_core/v0_9/basic_catalog\";\nimport { LEAF_MARGIN } from \"../utils\";\n\nexport const Divider = createReactComponent(DividerApi, ({ props }) => {\n const isVertical = props.axis === \"vertical\";\n const style: React.CSSProperties = {\n margin: LEAF_MARGIN,\n border: \"none\",\n backgroundColor: \"#ccc\",\n };\n\n if (isVertical) {\n style.width = \"1px\";\n style.height = \"100%\";\n } else {\n style.width = \"100%\";\n style.height = \"1px\";\n }\n\n return <div style={style} />;\n});\n"],"mappings":";;;;;;;AAqBA,MAAa,UAAU,qBAAqB,aAAa,EAAE,YAAY;CACrE,MAAM,aAAa,MAAM,SAAS;CAClC,MAAM,QAA6B;EACjC,QAAQ;EACR,QAAQ;EACR,iBAAiB;EAClB;AAED,KAAI,YAAY;AACd,QAAM,QAAQ;AACd,QAAM,SAAS;QACV;AACL,QAAM,QAAQ;AACd,QAAM,SAAS;;AAGjB,QAAO,oBAAC,SAAW,QAAS;EAC5B"}