Skip to content

Commit c5cec79

Browse files
committed
Add atoms implementation
1 parent 72ff786 commit c5cec79

File tree

6 files changed

+12
-20
lines changed

6 files changed

+12
-20
lines changed

frameworks/keyed/rendrjs-atoms/package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frameworks/keyed/rendrjs-atoms/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"webpack-cli": "5.1.4"
1111
},
1212
"dependencies": {
13-
"@rendrjs/core": "0.1.236"
13+
"@rendrjs/core": "0.1.237"
1414
},
1515
"js-framework-benchmark": {
1616
"frameworkVersionFromPackage": "@rendrjs/core",

frameworks/keyed/rendrjs-atoms/src/Button.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { button, div } from '@rendrjs/core';
2-
import { colSm6 } from './classes';
32

4-
let className = colSm6 + ' smallpad';
53
export let Button = (props) => {
64
return div({
7-
class: className,
5+
class: 'col-sm-6 smallpad',
86
slot: button({
97
id: props.id,
108
onclick: props.cb,

frameworks/keyed/rendrjs-atoms/src/Jumbotron.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { div, h1, rendr, useAtomSetter } from '@rendrjs/core';
22
import { Button } from './Button';
3-
import { colMd6 } from './classes';
43
import { dataAtom, selectedAtom } from './store';
54

65
let header = div({
7-
class: colMd6,
6+
class: 'col-md-6',
87
slot: h1({ slot: 'Rendrjs atoms keyed' }),
98
});
109

@@ -78,7 +77,7 @@ export let Jumbotron = () => {
7877
slot: [
7978
header,
8079
div({
81-
class: colMd6,
80+
class: 'col-md-6',
8281
slot: div({
8382
class: 'row',
8483
slot: [

frameworks/keyed/rendrjs-atoms/src/Row.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
import { a, td, tr, useAtomSelector, useAtomSetter } from '@rendrjs/core';
2-
import { colMd1, colMd4, colMd6 } from './classes';
32
import { makeIcon } from './RemoveIcon';
43
import { dataAtom, selectedAtom } from './store';
54

65
let icon = makeIcon();
7-
let emptyTd = td({ class: colMd6 });
6+
let emptyTd = td({ class: 'col-md-6' });
87

98
export let Row = ({ item }) => {
109
let setData = useAtomSetter(dataAtom);
@@ -19,16 +18,16 @@ export let Row = ({ item }) => {
1918
return tr({
2019
class: selected ? 'danger' : undefined,
2120
slot: [
22-
td({ class: colMd1, slot: `${item.id}` }),
21+
td({ class: 'col-md-1', slot: `${item.id}` }),
2322
td({
24-
class: colMd4,
23+
class: 'col-md-4',
2524
slot: a({
2625
onclick: () => setSelected(item.id),
2726
slot: item.label,
2827
}),
2928
}),
3029
td({
31-
class: colMd1,
30+
class: 'col-md-1',
3231
slot: a({
3332
onclick: () => del(item.id),
3433
slot: icon,

frameworks/keyed/rendrjs-atoms/src/classes.js

Lines changed: 0 additions & 4 deletions
This file was deleted.

0 commit comments

Comments
 (0)