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

fix(Flex): FlexProps extends UIComponentProps #1089

Merged
merged 7 commits into from
Mar 27, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react/src/components/Flex/Flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as PropTypes from 'prop-types'
import * as React from 'react'
import * as _ from 'lodash'

import { UIComponent, commonPropTypes } from '../../lib'
import { UIComponent, commonPropTypes, UIComponentProps, ChildrenComponentProps } from '../../lib'
import { ReactProps } from '../../types'
import FlexItem from './FlexItem'

export interface FlexProps {
export interface FlexProps extends UIComponentProps, ChildrenComponentProps {
[key: string]: any
miroslavstastny marked this conversation as resolved.
Show resolved Hide resolved

/** Defines if container should be inline element. */
Expand Down
8 changes: 4 additions & 4 deletions packages/react/src/components/Flex/FlexItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import * as React from 'react'
import * as PropTypes from 'prop-types'
import cx from 'classnames'
import * as _ from 'lodash'
import { UIComponent, commonPropTypes } from '../../lib'
import { UIComponent, commonPropTypes, UIComponentProps, ChildrenComponentProps } from '../../lib'
import { mergeStyles } from '../../lib/mergeThemes'
import { Extendable } from '../../types'
import { ReactProps } from '../../types'

export interface FlexItemProps {
export interface FlexItemProps extends UIComponentProps, ChildrenComponentProps {
miroslavstastny marked this conversation as resolved.
Show resolved Hide resolved
/** Controls item's alignment. */
align?: 'auto' | 'start' | 'end' | 'center' | 'baseline' | 'stretch'

Expand Down Expand Up @@ -36,7 +36,7 @@ export interface FlexItemProps {
flexDirection?: 'row' | 'column'
}

class FlexItem extends UIComponent<Extendable<FlexItemProps>> {
class FlexItem extends UIComponent<ReactProps<FlexItemProps>> {
static className = 'ui-flex__item'

static displayName = 'FlexItem'
Expand Down