Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-native-kanban-for-ncore

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-kanban-for-ncore

NİBGAT® | NCore Mobile Component Library

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
increased by300%
Maintainers
1
Weekly downloads
 
Created
Source

React Native Kanban

Kanban and Calendar for NCore Mobile

https://user-images.githubusercontent.com/17149305/198445922-cec7d3f4-39ee-47d4-86a3-ae474b4b491c.mp4

Requirements

Installation

yarn add react-native-kanban-for-ncore

Usage

import React from "react";
import {
    View
} from "react-native";
import {
    useNCoreLocalization,
    useNCoreTheme,
    PageContainer,
    Text
} from "ncore-mobile";
import Kanban from "react-native-kanban-for-ncore";

const MOCK_DATA_FOR_ROWS = {
    "07:00": {
        title: "07:00"
    },
    "07:15": {
        title: "07:15"
    },
    "07:30": {
        title: "07:30"
    },
    "07:45": {
        title: "07:45"
    },
    "08:00": {
        title: "08:00"
    },
    "08:15": {
        title: "08:15"
    },
    "08:30": {
        title: "08:30"
    },
    "08:45": {
        title: "08:45"
    },
    "09:00": {
        title: "09:00"
    }
};

const MOCK_DATA_FOR_COLUMN_WITH_CALENDAR = [
    {
        id: uuid(),
        title: "Column 1",
        rows: {
            "07:00": {
                id: uuid(),
                title: "Column 1 - Row 1",
                bgColor: "#00c2a9"
            },
            "07:15": {
                id: uuid(),
                title: "Column 1 - Row 2",
                bgColor: "white"
            },
            "07:45": {
                id: uuid(),
                title: "Column 1 - Row 4",
                bgColor: "violet"
            }
        }
    },
    {
        id: uuid(),
        title: "Column 2",
        rows: {
            "07:00": {
                id: uuid(),
                title: "Column 2 - Row 1",
                bgColor: "red"
            },
            "07:15": {
                id: uuid(),
                title: "Column 2 - Row 2",
                bgColor: "blue"
            }
        }
    },
    {
        id: uuid(),
        title: "Column 3",
        rows: {
            "07:00": {
                id: uuid(),
                title: "Column 4 - Row 1",
                bgColor: "purple"
            },
            "07:15": {
                id: uuid(),
                title: "Column 4 - Row 2",
                bgColor: "pink"
            }
        }
    },
    {
        id: uuid(),
        title: "Column 4",
        rows: {
            "07:00": {
                id: uuid(),
                title: "Column 3 - Row 1",
                bgColor: "yellow"
            },
            "07:15": {
                id: uuid(),
                title: "Column 3 - Row 2",
                bgColor: "navi"
            }
        }
    }
];

const MOCK_DATA_FOR_COLUMN_WITH_KANBAN = [
    {
        id: uuid(),
        title: "Column 1",
        rows: [
            {
                id: uuid(),
                title: "07:00",
                bgColor: "#00c2a9"
            },
            {
                id: uuid(),
                title: "07:15",
                bgColor: "white"
            }
        ]
    },
    {
        id: uuid(),
        title: "Column 2",
        rows: [
            {
                id: uuid(),
                title: "07:00",
                bgColor: "orange"
            },
            {
                id: uuid(),
                title: "07:15",
                bgColor: "purple"
            }
        ]
    },
    {
        id: uuid(),
        title: "Column 3",
        rows: [
            {
                id: uuid(),
                title: "07:00",
                bgColor: "navy"
            },
            {
                id: uuid(),
                title: "07:15",
                bgColor: "brown"
            }
        ]
    },
    {
        id: uuid(),
        title: "Column 4",
        rows: [
            {
                id: uuid(),
                title: "07:00",
                bgColor: "teal"
            },
            {
                id: uuid(),
                title: "07:15",
                bgColor: "grey"
            }
        ]
    }
];

const Home = () => {
    const {
        spaces
    } = useNCoreTheme();
    const {
        localize
    } = useNCoreLocalization();

    return <PageContainer
        scrollable={false}
    >
        <Kanban
            outerVerticalSpacing={spaces.container * 1.5}
            data={TYPE === "kanban" ? MOCK_DATA_FOR_COLUMN_WITH_KANBAN : MOCK_DATA_FOR_COLUMN_WITH_CALENDAR}
            titlesOfRows={TYPE === "kanban" ? undefined : MOCK_DATA_FOR_ROWS}
            type={TYPE}
            renderItem={({
                item,
                index
            }) => {
                return <View
                    style={[
                        {
                            backgroundColor: item.bgColor
                        },
                        stylesheet.item
                    ]}
                >
                    <Text>
                        {item.title}
                    </Text>
                </View>;
            }}
        />
    </PageContainer>;
};
export default Home;

Keywords

FAQs

Package last updated on 29 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc