Skip to content

Commit f6368aa

Browse files
author
Vocamen
committed
expurged camera and fixed some attributes
1 parent 4f7f810 commit f6368aa

File tree

2 files changed

+36
-18
lines changed

2 files changed

+36
-18
lines changed

src/blocks.js

+7
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,13 @@ export default (editor, opts = {}) => {
375375
content: { type: 'daisy-Phone' },
376376
media: 'Phone',
377377
});
378+
bm.add('d-camera', {
379+
category: 'Mockup',
380+
name: 'd-camera',
381+
label: 'Daisy camera',
382+
content: { type: 'daisy-camera' },
383+
media: 'camera',
384+
});
378385
bm.add('d-Window', {
379386
category: 'Mockup',
380387
name: 'd-Window',

src/components.js

+29-18
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export default (editor, opts = {}) => {
3131
defaults: {
3232
content: `.`,
3333
traits: ['id','title',{ label: 'text', type: 'text', name: 'content', changeProp: true }],
34-
attributes: { class: 'container mx-auto' }
34+
attributes: { class: 'container mx-auto flex justify-center p-4' }
3535
},
3636
},
3737
view: {
@@ -481,11 +481,11 @@ export default (editor, opts = {}) => {
481481
domc.addType('daisy-Radio', {
482482
model: {
483483
defaults: {
484-
traits: ['id','title',{ label: 'Radio code', type: 'textarea', name: 'content', changeProp: true }],
485-
content: `<input type="radio" name="radio-1" class="radio" checked />
486-
<input type="radio" name="radio-1" class="radio" />`,
487-
tagName:'div',
484+
traits: ['id','title',{ label: 'Radio code', type: 'text', name: 'content', changeProp: true }],
485+
content: `.`,
486+
tagName:'input',
488487
editable: true,
488+
attributes: { class: 'radio' }
489489
},
490490
},
491491
view: {
@@ -551,10 +551,11 @@ export default (editor, opts = {}) => {
551551
domc.addType('daisy-Input', {
552552
model: {
553553
defaults: {
554-
traits: ['id','title',{ label: 'Input code', type: 'textarea', name: 'content', changeProp: true }],
555-
content: `<input type="text" placeholder="Type here" class="input input-bordered w-full max-w-xs" />`,
554+
traits: ['id','title', 'placeholder',{ label: 'Input value', type: 'text', name: 'content', changeProp: true }],
555+
content: `.`,
556556
tagName:'input',
557557
editable: true,
558+
attributes: { class: 'input input-bordered w-full max-w-xs' }
558559
},
559560
},
560561
view: {
@@ -591,9 +592,10 @@ export default (editor, opts = {}) => {
591592
model: {
592593
defaults: {
593594
traits: ['id','title',{ label: 'Artboard code', type: 'textarea', name: 'content', changeProp: true }],
594-
content: `<div class="artboard artboard-horizontal phone-1">568×320</div>`,
595-
tagName:'input',
595+
content: `568×320`,
596+
tagName:'div',
596597
editable: true,
598+
attributes: { class: 'artboard artboard-horizontal phone-1' }
597599
},
598600
},
599601
view: {
@@ -984,14 +986,24 @@ export default (editor, opts = {}) => {
984986
model: {
985987
defaults: {
986988
traits: ['id','title',{ label: 'Phone code', type: 'textarea', name: 'content', changeProp: true }],
987-
content: `<div class="mockup-phone">
988-
<div class="camera"></div>
989-
<div class="display">
990-
<div class="artboard artboard-demo phone-1">Hi.</div>
991-
</div>
992-
</div>`,
989+
content: `.`,
993990
tagName:'div',
994991
editable: true,
992+
attributes: { class: 'mockup-phone border bg-base-300' }
993+
},
994+
},
995+
view: {
996+
997+
},
998+
});
999+
domc.addType('daisy-camera', {
1000+
model: {
1001+
defaults: {
1002+
traits: ['id','title'],
1003+
content: ``,
1004+
tagName:'div',
1005+
editable: true,
1006+
attributes: { class: 'camera' }
9951007
},
9961008
},
9971009
view: {
@@ -1002,11 +1014,10 @@ export default (editor, opts = {}) => {
10021014
model: {
10031015
defaults: {
10041016
traits: ['id','title',{ label: 'Window code', type: 'textarea', name: 'content', changeProp: true }],
1005-
content: `<div class="mockup-window border bg-base-300">
1006-
<div class="flex justify-center px-4 py-16 bg-base-200">Hello!</div>
1007-
</div>`,
1017+
content: `.`,
10081018
tagName:'div',
10091019
editable: true,
1020+
attributes: { class: 'mockup-window border bg-base-300' }
10101021
},
10111022
},
10121023
view: {

0 commit comments

Comments
 (0)