Skip to content

Commit

Permalink
Correct interfaces (#12)
Browse files Browse the repository at this point in the history
* Add items field to ListComponent interface

* Add Divider type to intercom.types.js
  • Loading branch information
connorlurring authored May 25, 2021
1 parent e0fa6dd commit dd9e622
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@efstajas/tela",
"version": "4.5.4",
"version": "4.5.5",
"description": "A framework for building Intercom Canvas Kit applications.",
"main": "lib/index.js",
"scripts": {
Expand Down
10 changes: 9 additions & 1 deletion src/intercom.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,12 @@ export type Component =
| InputOption
| TextArea
| ListComponent
| Divider

export interface ListComponent {
type: 'list',
disabled?: boolean
disabled?: boolean,
items: ListComponentItem[]
}

export interface ListComponentItem {
Expand Down Expand Up @@ -136,6 +138,12 @@ export interface Spacer {
size: 's' | 'm' | 'l' | 'xl'
}

export interface Divider {
type: 'divider'
id?: string,
bottom_margin?: 'none'
}

export interface DataTableFieldValue {
type: 'field-value'
field: string
Expand Down

0 comments on commit dd9e622

Please sign in to comment.