Skip to content

Commit f644be4

Browse files
committed
feature completed
1 parent 9ebf20f commit f644be4

3 files changed

Lines changed: 82 additions & 116 deletions

File tree

src/components/editorPage/menu-drop-down/menu-drop-down.tsx

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Component, h, Prop, State } from '@stencil/core';
1+
import { Component, h, Host, Prop, State } from '@stencil/core';
22
import state from '../store';
33

44
@Component({
@@ -28,36 +28,39 @@ export class MenuDropDown {
2828

2929
render() {
3030
return (
31-
<div class="relative">
31+
<Host class="relative w-full py-2">
3232
{/* Header */}
33-
<h2 onClick={() => this.toggleDropdown()} class="font-sans text-gray-600 hover:text-indigo-800 cursor-pointer transition text-sm capitalize flex gap-1 items-center">
33+
{/* <h2 onClick={() => this.toggleDropdown()} class="font-sans text-gray-600 hover:text-indigo-800 cursor-pointer transition text-sm capitalize flex gap-1 items-center">
3434
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6">
3535
<path
3636
stroke-linecap="round"
3737
stroke-linejoin="round"
3838
d="M12 6.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 12.75a.75.75 0 110-1.5.75.75 0 010 1.5zM12 18.75a.75.75 0 110-1.5.75.75 0 010 1.5z"
3939
/>
4040
</svg>
41-
</h2>
41+
</h2> */}
42+
<div onClick={() => this.toggleDropdown()} class='w-full pl-3 cursor-pointer'>
43+
{this.listTitle}
44+
</div>
4245
<backdrop-filter showBackDrop={this.showDropdown} backDropHandler={this.backDropHandler}></backdrop-filter>
4346
{/* List */}
4447
<div
4548
id="dropdownDefaultButton"
4649
data-dropdown-toggle="dropdown"
4750
style={{ right: '0px' }}
48-
class={this.showDropdown ? 'absolute bg-white z-10 w-44 text-sm list-none mt-2 rounded divide-y right-0 divide-gray-100 shadow ' : 'hidden'}
51+
class={this.showDropdown ? 'absolute bg-gray-300 z-50 w-44 text-sm list-none mt-2 rounded-md divide-y -bottom-1 right-0 divide-gray-100 shadow ' : 'hidden'}
4952
>
50-
<ul id="dropdown" class="py-1 bg-white">
53+
<ul id="dropdown" class="py-1 bg-gray-300 rounded-b-md">
5154
{this.list?.map(item => (
5255
<li>
53-
<a href="#" onClick={() => this.buttonHandler(this.listTitle)} class="block py-2 px-4 text-sm text-gray-700 hover:bg-gray-100">
56+
<a href="#" onClick={() => this.buttonHandler(this.listTitle)} class="block py-1 px-4 text-sm text-gray-700 cursor-pointer">
5457
{item}
5558
</a>
5659
</li>
5760
))}
5861
</ul>
5962
</div>
60-
</div>
63+
</Host>
6164
);
6265
}
6366
}

src/components/editorPage/node-item/node-item.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ export class NodeItem {
2727
{state.availableNodes.map(item => {
2828
return (
2929
<li>
30-
<div class="flex justify-between p-2 text-base font-normal text-gray-900 rounded-lg bg-gray-200">
31-
<div class="ml-3">{item}</div>
30+
<div class="flex justify-between text-base font-normal text-gray-900 rounded-lg bg-gray-200">
31+
{/* <div class="ml-3">{item}</div> */}
3232
<menu-drop-down listTitle={item} list={DROPDOWN_ITEMS} fetchData={nodeName => this.nodeChangeHandler(nodeName)}></menu-drop-down>
3333
</div>
3434
</li>

0 commit comments

Comments
 (0)