双子座设计系统
* 双子座不再开发
此控制库已不再在开发中. 为了开发GeneXus扩展 变色龙控制库 正在连同 汞设计系统。 。 。 .
关于双子座
GeneXus IDEs的设计系统(GeneXus M和GeneXus for Windows). 给 您可以找到调色板、打字、样式和组件的概览。 你可以尝试设计系统组件 这里。 。 。 .
开始
npm install
npm start
运行测试
要运行自定义元素的单元测试, 运行:
npm test
生产大楼
为了构建生产设计,运行:
npm run build
使用这个设计系统
脚本标签
- 设置类似此的脚本标签
<script src='https://unpkg.com/@genexus/gemini/dist/gemini.js'></script>在索引.html的首页 - 设置类似此的链接标签
<link href="https://unpkg.com/@genexus/gemini/dist/gemini/gemini.css" rel="stylesheet" />在索引.html的首页 - 然后可以开始使用您模板中的布局编辑器,JSX,html等.
节点模块
- 运行
npm install @genexus/gemini --save - 设置类似此的脚本标签
<script src='node_modules/@genexus/gemini/dist/gemini.js'></script>在索引.html的首页 - 设置类似此的链接标签
<link href="node_modules/@genexus/gemini/dist/gemini/gemini.css" rel="stylesheet" />在索引.html的首页 - 然后可以开始使用您模板中的布局编辑器,JSX,html等.
黑暗主题
- 简单添加
dark类到html标签.
右到左读方向
- 双子座还用"右向左"来读取方向语言. 刚刚设置
dir属性值到rtl编辑html标签.
与 Stencil 使用此设计系统
安装双子座
npm install @genexus/gemini --save- 为 Stencil 安装 SAS 插件 :
npm install @stencil/sass --save-dev - 编辑
stencil.config.ts已解释 这里。 。 。 . - 添加
globalStyle内stencil.config.ts指点src/globals/global.scss
这个 stencil.config.ts 文件应该看起来像这样:
import { Config } from "@stencil/core";
import { sass } from "@stencil/sass";
export const config: Config = {
namespace: "project-name",
outputTargets: [
{
type: "dist",
esmLoaderPath: "../loader"
},
{
type: "docs-readme"
},
{
type: "www",
serviceWorker: null
}
],
globalStyle: "src/globals/global.scss",
plugins: [sass()]
};
- 创建
global.scss文件编号src/globals。 。 。 . - 向内部双子座样式表添加导入
global.scss数字 :
@import "../../node_modules/@genexus/gemini/dist/gemini/gemini.css";
- 在内部添加导入到双子星 JavaScript 文件
src/index.ts数字 :import "@genexus/gemini"; - 在第四点定义了全局Style后, 您的组件库将输出一个 CSS 文件 。 您必须将此 CSS 文件包含在您的
src/index.html文档。 样式表的名称与工程名称相同 :<link rel="stylesheet" href="/build/project-name.css" /> - 没问题! 您现在可以消费双子座的网络组件并使用其CSS变量:
<gxg-button>Button</gxg-button>
作者数
见 捐助者 参与该项目的人.
许可证
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.