Skip to content
This repository has been archived by the owner on Mar 4, 2020. It is now read-only.

Commit

Permalink
feat(Chat): add props interface (#131)
Browse files Browse the repository at this point in the history
* -changed typings for the Chat component

* -updated Chat prop interface

* -added children as prop in the props interfaces for the Button and Accordion
  • Loading branch information
mnajdova authored and kuzhelov committed Aug 24, 2018
1 parent 46cd27f commit 4b3cd2e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 7 deletions.
5 changes: 0 additions & 5 deletions docs/src/examples/components/Chat/Types/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ const Types = () => (
description="A default Chat."
examplePath="components/Chat/Types/ChatExample"
/>
<ComponentExample
title="Shorthand"
description="Chat messages can be defined with shorthand."
examplePath="components/Chat/Types/ChatExample"
/>
</ExampleSection>
)

Expand Down
14 changes: 12 additions & 2 deletions src/components/Chat/Chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,20 @@ import * as _ from 'lodash'
import * as PropTypes from 'prop-types'
import * as React from 'react'

import { childrenExist, customPropTypes, UIComponent } from '../../lib'
import { childrenExist, customPropTypes, UIComponent, Extendable } from '../../lib'
import ChatMessage from './ChatMessage'
import { ComponentVariablesInput, IComponentPartStylesInput } from '../../../types/theme'

export interface IChatProps {
as?: any
className?: string
children?: React.ReactNode
messages?: any[]
styles?: IComponentPartStylesInput
variables?: ComponentVariablesInput
}

class Chat extends UIComponent<any, any> {
class Chat extends UIComponent<Extendable<IChatProps>, any> {
static className = 'ui-chat'

static displayName = 'Chat'
Expand Down

0 comments on commit 4b3cd2e

Please sign in to comment.