1.0.5 • Published 2 years ago

@teamix/quick-entry-card v1.0.5

Weekly downloads
10
License
MIT
Repository
-
Last release
2 years ago

快捷入口卡片

用于展示一些链接类快捷入口的卡片组件。

API

interface IProps extends CardProps {
  dataSource: IEntry[];
  col?: number;
}
参数名说明必填类型默认值备注
dataSource一个数组,字段见下方 IEntryIEntry[]
col定义快捷入口有几列,默认为 3 列number3

其他 API 与 Card 组件 相同(如 title、extra 等)。

IEntry

interface IEntry {
  text?: string;
  href?: string;
  target?: string;
  icon?: JSX.Element;
  onClick?: () => void;
  jsx?: JSX.Element; // jsx 属性存在时,上述属性均失效,直接渲染该属性
}

text、href 等属性用于描述一个快捷入口链接,你也可以使用 jsx 属性自定义要渲染的东西。