Skip to content

Commit

Permalink
fix(interfaces): add interfaces to default props
Browse files Browse the repository at this point in the history
  • Loading branch information
arlair committed Apr 11, 2016
1 parent d6b5d00 commit a7fe2a6
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/App.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { CycleDomComponent, CycleUiComponentProps } from '../helpers/cycleDomInt
export interface AppProps extends CycleUiComponentProps {
}

export const AppDefaultProps = {
export const AppDefaultProps: AppProps = {
isolate: false,
className: ''
};
Expand Down
2 changes: 1 addition & 1 deletion src/button/Button.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export interface ButtonProps extends CycleUiComponentProps {
type?: string;
};

const ButtonDefaultProps = {
const ButtonDefaultProps: ButtonProps = {
// Enforce isolation for now, otherwise Buttons may interact
isolate: true,
accent: false,
Expand Down
2 changes: 1 addition & 1 deletion src/card/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface CardProps extends CycleUiComponentProps {
raised?: boolean;
};

const CardDefaultProps = {
const CardDefaultProps: CardProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down
2 changes: 1 addition & 1 deletion src/card/CardActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export interface CardActionsProps extends CycleUiComponentProps {
children?: Array<CycleComponent>;
};

const CardActionsDefaultProps = {
const CardActionsDefaultProps: CardActionsProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down
2 changes: 1 addition & 1 deletion src/card/CardText.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as classNames from 'classnames';
export interface CardTextProps extends CycleUiComponentProps {
};

const CardTextDefaultProps = {
const CardTextDefaultProps: CardTextProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down
2 changes: 1 addition & 1 deletion src/card/CardTitle.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface CardTitleProps extends CycleUiComponentProps {
title?: string | CycleComponent;
};

const CardTitleDefaultProps = {
const CardTitleDefaultProps: CardTitleProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down
3 changes: 1 addition & 2 deletions src/input/Input.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export interface InputProps extends CycleUiComponentProps {
step?: number;
}

const InputDefaultProps = {
const InputDefaultProps: InputProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down Expand Up @@ -84,7 +84,6 @@ export function InputFactory(sources: any, props$: Observable<InputProps>): Cycl
}, props.className);

// TODO: split input into a new function
// TODO: make an equivalent of data-react-toolbox='input' for div?
return (
div( { props: { className: divClassName }, attrs: { 'data-cycle-ui': 'input' } }, [
h(props.multiline ? 'textarea' : 'input', {
Expand Down
2 changes: 1 addition & 1 deletion src/radio/Radio.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface RadioProps extends CycleUiComponentProps {
};

//TODO: make defaults or use parents?
const RadioDefaultProps = {
const RadioDefaultProps: RadioProps = {
// Enforce isolation for now
isolate: true,
checked: false,
Expand Down
2 changes: 1 addition & 1 deletion src/radio/RadioButton.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export interface RadioButtonProps extends CycleUiComponentProps {
value?: any;
};

const RadioButtonDefaultProps = {
const RadioButtonDefaultProps: RadioButtonProps = {
// Enforce isolation for now
isolate: true,
checked: false,
Expand Down
2 changes: 1 addition & 1 deletion src/radio/RadioGroup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface RadioGroupProps extends CycleUiComponentProps {
value?: any;
};

const RadioGroupDefaultProps = {
const RadioGroupDefaultProps: RadioGroupProps = {
// Enforce isolation for now
isolate: true,
className: '',
Expand Down

0 comments on commit a7fe2a6

Please sign in to comment.