Skip to content

Commit

Permalink
feat: add component Separator
Browse files Browse the repository at this point in the history
  • Loading branch information
xhofe committed Aug 25, 2022
1 parent 9c80897 commit fcfcc96
Show file tree
Hide file tree
Showing 4 changed files with 294 additions and 235 deletions.
5 changes: 3 additions & 2 deletions packages/solid-contextmenu/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Component } from "solid-js";
import { Menu, useContextMenu, Item } from ".";
import { Menu, useContextMenu, Item, Separator } from ".";

const App: Component = () => {
const { show } = useContextMenu({ id: "1", props: "lala" });
Expand All @@ -11,10 +11,11 @@ const App: Component = () => {
}}
>
right click
<Menu id="1" animation="scale" theme="dark">
<Menu id="1" animation="scale" theme="light">
<Item>⚡ Beautiful</Item>
<Item>😊 Easy use</Item>
<Item>💕 Built with heart</Item>
<Separator />
<Item disabled>❌ Disabled</Item>
</Menu>
</div>
Expand Down
5 changes: 5 additions & 0 deletions packages/solid-contextmenu/src/components/Separator.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { STYLE } from "../constants";

export const Separator = () => {
return <div class={STYLE.separator} />;
};
1 change: 1 addition & 0 deletions packages/solid-contextmenu/src/components/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export * from "./Menu";
export * from "./Item";
export * from "./Separator";

0 comments on commit fcfcc96

Please sign in to comment.