Skip to content

Commit

Permalink
refactor(cleanup): cleanup the code a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
arlair committed Apr 16, 2016
1 parent d76ea4d commit a109169
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
10 changes: 5 additions & 5 deletions src/demo/kitchenSink/components/views/Headings.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { h1, h2, h3, h4, h5, h6 } = require('cycle-snabbdom');
import { Card, CardTitle, CardText } from '@eldarlabs/cycle-ui';
import { CardText } from '@eldarlabs/cycle-ui';
import { DemoCardView } from '../../../components/DemoCard';

export function HeadingsView(sources: any) {
return (
Card(sources, null, [
CardTitle(sources, { title: 'Headings' } ).DOM,
CardText(sources, null, [
DemoCardView(sources, 'Headings', [
CardText(sources, [
h1('Heading 1'),
h2('Heading 2'),
h3('Heading 3'),
h4('Heading 4'),
h5('Heading 5'),
h6('Heading 6'),
]).DOM,
]).DOM
])
);
}
10 changes: 5 additions & 5 deletions src/demo/kitchenSink/components/views/Inputs.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
const { h4 } = require('cycle-snabbdom');
import { Card, CardTitle, CardText, Input } from '@eldarlabs/cycle-ui';
import { CardText, Input } from '@eldarlabs/cycle-ui';
import { DemoCardView } from '../../../components/DemoCard';

export function InputsView(sources: any) {
return (
Card(sources, null, [
CardTitle(sources, { title: 'Text Inputs' } ).DOM,
CardText(sources, null, [
DemoCardView(sources, 'Text Inputs', [
CardText(sources, [
h4('Default Input (no properties)'),
Input(sources).DOM,
Input(sources, {
label: 'Input: Max Length',
maxLength: 10,
}).DOM,
]).DOM,
]).DOM
])
);
}
8 changes: 4 additions & 4 deletions src/demo/kitchenSink/components/views/Radios.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { Card, CardTitle, CardActions, RadioButton, RadioGroup } from '@eldarlabs/cycle-ui';
import { DemoCardView } from '../../../components/DemoCard';

export function RadiosView(sources: any) {
return (
Card(sources, null, [
CardTitle(sources, { title: 'Radios (Work in progress)' } ).DOM,
CardActions(sources, null, [
DemoCardView(sources, 'Radios (Work in progress)', [
CardActions(sources, [
RadioButton(sources, {
label: 'Radio Single',
value: 'RadioSingle',
Expand All @@ -14,6 +14,6 @@ export function RadiosView(sources: any) {
RadioButton(sources, { label: 'Radio is not easy', value: 'RadioHard', })
]).DOM,
]).DOM
]).DOM
])
);
}

0 comments on commit a109169

Please sign in to comment.