custom-antd-fields-menu
v1.0.2
Published
node version: 14.16.0
Downloads
7
Readme
Custom fields menu
node version: 14.16.0
npm version: 7.7.6
About
This npm package is built around AntD Menu.
Please note
This package have dependency on antd Menu.
For development
npm i
npm run start
Quick Start
// filename: itemslist.js
import {
FileTextOutlined,
FieldNumberOutlined,
SelectOutlined,
BarsOutlined,
CalendarOutlined,
UserOutlined,
CheckSquareOutlined,
MailOutlined,
LinkOutlined,
} from "@ant-design/icons";
export default [
{
key: "0",
icon: FileTextOutlined,
label: "Text",
action: () => {
console.log("clicked!");
},
},
{
key: "1",
icon: FieldNumberOutlined,
label: "Number",
action: () => {
console.log("clicked!");
},
},
{
key: "2",
icon: SelectOutlined,
label: "Single Select",
action: () => {
console.log("clicked!");
},
},
{
key: "3",
icon: BarsOutlined,
label: "Multiple Select",
action: () => {
console.log("clicked!");
},
},
{
key: "4",
icon: CalendarOutlined,
label: "Date",
action: () => {
console.log("clicked!");
},
},
{
key: "5",
icon: UserOutlined,
label: "People",
action: () => {
console.log("clicked!");
},
},
{
key: "6",
icon: CheckSquareOutlined,
label: "Checkbox",
action: () => {
console.log("clicked!");
},
},
{
key: "7",
icon: MailOutlined,
label: "Email",
action: () => {
console.log("clicked!");
},
},
{
key: "8",
icon: FileTextOutlined,
label: "Files",
action: () => {
console.log("clicked!");
},
},
{
key: "9",
icon: LinkOutlined,
label: "Url",
action: () => {
console.log("clicked!");
},
},
];
// filename: App.js
import FieldsMenu from "custom-antd-fields-menu";
import options from "./data/itemlist";
function App() {
return (
<div>
<FieldsMenu options={options} />
</div>
);
}
export default App;
For testing
npm test
For building
npm run build
development Environment
- Windows 10 (Intel i5 - 8th Gen, RAM - 12GB)
- Visual Studio Code
- Visual Studio code Extensions
- Prettier - Code formatter
- React Extension Pack
- Path Intellisense
Test Coverage
Current test coverage is 21.43% (% lines) [Click for more Details]https://gitlab.com/Talking-DB/coding/pocs/ui-components/custom-fields-ui/via-antd-context-menu/-/issues/2#note_725242145)