Skip to content

Conversation

@paul-felt
Copy link

Added ListView to the possible children of Card (WidgetComponent). This is in line with:

  1. Docs here https://platform.openai.com/docs/guides/chatkit-widgets

  2. Widgets generated by the Widget Builder (which create widgets like the following, where ListView is a child of Card

  <ListView>
    <ListViewItem
      onClickAction={{ type: "twistie.toggle" }}
      gap={2}
      align="center"
    >
      <Icon name={expanded ? "chevron-down" : "chevron-right"} />
      <Text value={expanded ? summary : summary} />
    </ListViewItem>
    {expanded && (
      <ListViewItem align="stretch">
        <Col padding={{ x: 4, y: 1 }} gap={2}>
          <Markdown value={content} />
        </Col>
      </ListViewItem>
    )}
  </ListView>
</Card>```

Added ListView to the possible children of Card (WidgetComponent). This is in line with:

1. Docs here
https://platform.openai.com/docs/guides/chatkit-widgets

2. Widgets generated by the Widget Builder (which create widgets like the following, where ListView is a child of Card

```<Card size="sm" padding={0}>
  <ListView>
    <ListViewItem
      onClickAction={{ type: "twistie.toggle" }}
      gap={2}
      align="center"
    >
      <Icon name={expanded ? "chevron-down" : "chevron-right"} />
      <Text value={expanded ? summary : summary} />
    </ListViewItem>
    {expanded && (
      <ListViewItem align="stretch">
        <Col padding={{ x: 4, y: 1 }} gap={2}>
          <Markdown value={content} />
        </Col>
      </ListViewItem>
    )}
  </ListView>
</Card>```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant