Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
@intechnity/react-native-kanban-board
Advanced tools
Readme
A kanban board for React Native.
npm install @intechnity/react-native-kanban-board
Import the necessary components and types:
import { KanbanBoard, ColumnModel, CardModel } from '@intechnity/react-native-kanban-board';
Define the columns and cards:
const columns = [
new ColumnModel("new", "New", 1),
new ColumnModel("inProgress", "In Progress", 2),
new ColumnModel("ready", "Ready", 3),
];
const cards = [
new CardModel(
"card1",
"new",
"1st Card",
"Example card",
"test description",
[
{
text: "Tag1",
backgroundColor: "#00FF00",
textColor: "#000000"
}
],
null,
1
),
// ... add more cards ...
];
Create event handlers:
const onCardDragEnd = (srcColumn: ColumnModel, destColumn: ColumnModel, item: CardModel, targetIdx: number) => {
// Handle card drag and drop
};
const onCardPress = (item: CardModel) => {
// Handle card press
};
Render the Kanban Board component:
<KanbanBoard
columns={columns}
cards={cards}
onDragEnd={onCardDragEnd}
onCardPress={onCardPress}
/>
columns: ColumnModel[]
An array of ColumnModel
instances representing the columns on the Kanban board.
cards: CardModel[]
An array of CardModel
instances representing the cards within the columns.
onCardPress?: (model: CardModel) => void
Callback function invoked when a card is pressed.
onDragEnd: (srcColumn: ColumnModel, destColumn: ColumnModel, item: CardModel, targetIdx: number) => void
Callback function invoked when a card is dragged and dropped onto another column. It receives the following parameters:
srcColumn: ColumnModel
- The source column from which the card was dragged.destColumn: ColumnModel
- The destination column where the card was dropped.item: CardModel
- The card that was dragged and dropped.targetIdx: number
- The index at which the card was dropped within the destination column.renderCardContent?(model: CardModel): JSX.Element | null
Optional custom renderer for the card content.
renderEmptyColumn?: (item: ColumnModel) => JSX.Element
Optional custom renderer for an empty column.
cardContainerStyle?: StyleProp<ViewStyle>
Custom style for the card container.
cardTitleTextStyle?: StyleProp<TextStyle>
Custom style for the card title text.
cardSubtitleTextStyle?: StyleProp<TextStyle>
Custom style for the card subtitle text.
cardContentTextStyle?: StyleProp<TextStyle>
Custom style for the card content text.
columnHeaderContainerStyle?: StyleProp<ViewStyle>
Custom style for the column header container.
columnHeaderTitleStyle?: StyleProp<TextStyle>
Custom style for the column header title.
Note: StyleProp<ViewStyle>
and StyleProp<TextStyle>
are types from the react-native
package and are used to define custom styles for components.
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
test
The npm package @intechnity/react-native-kanban-board receives a total of 12 weekly downloads. As such, @intechnity/react-native-kanban-board popularity was classified as not popular.
We found that @intechnity/react-native-kanban-board demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.