From d76ea4d1e97c7a7441b7066c3a8eb54282fea99a Mon Sep 17 00:00:00 2001 From: arlair Date: Fri, 15 Apr 2016 21:16:05 +0800 Subject: [PATCH] fix(Dialog): fix Dialog actions and children --- package.json | 2 +- src/demo/kitchenSink/components/views/Dialogs.ts | 13 ++++++++----- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 0a0c8eb..fd25420 100644 --- a/package.json +++ b/package.json @@ -50,7 +50,7 @@ "dependencies": { "@cycle/core": "^6.0.0", "@cycle/isolate": "1.2.0", - "@eldarlabs/cycle-ui": "0.6.1", + "@eldarlabs/cycle-ui": "0.6.2", "autoprefixer": "^6.3.4", "classnames": "^2.2.3", "cycle-snabbdom": "1.2.1", diff --git a/src/demo/kitchenSink/components/views/Dialogs.ts b/src/demo/kitchenSink/components/views/Dialogs.ts index c2e8864..9e9480e 100644 --- a/src/demo/kitchenSink/components/views/Dialogs.ts +++ b/src/demo/kitchenSink/components/views/Dialogs.ts @@ -1,8 +1,7 @@ -import { Button, Card, CardTitle, CardActions, Dialog, ButtonFactory } from '@eldarlabs/cycle-ui'; +import { Button, Card, CardTitle, CardText, Dialog } from '@eldarlabs/cycle-ui'; import { Observable as $ } from 'rx'; -const { button, p } = require('cycle-snabbdom'); +const { p } = require('cycle-snabbdom'); //import { CycleComponent } from '@eldarlabs/cycle-ui/helpers/cycleDomInterfaces'; -import { Counter } from '../../../counter'; export function Dialogs(sources: any) { const DOM = sources.DOM; @@ -30,12 +29,16 @@ export function Dialogs(sources: any) { return ( Card(sources, null, [ CardTitle(sources, { title: 'Dialogs (Work in progress)' }, [ - CardActions(sources, null, [ + CardText(sources, [ Button(sources, { className: 'showDialog', label: 'Show Modal Dialog', raised: true }).DOM, p('is active:' + isDialogActive), Dialog({ title: 'Test Dialog', active: isDialogActive, - actions: [cancelButton.DOM, saveButton.DOM] }).DOM, + actions: [cancelButton.DOM, saveButton] }, [ + p('This is a dialog'), + p('A dialog can have multiple children controls') + ] + ).DOM ]).DOM ]).DOM ]).DOM