From 12bfc5f62021e3b159f75b542629bdd272b96f11 Mon Sep 17 00:00:00 2001 From: Muhammed Kaplan Date: Wed, 16 Aug 2023 23:35:59 +0200 Subject: [PATCH] feat:add classnames support for container --- src/index.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/index.tsx b/src/index.tsx index b535239..4492829 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -23,6 +23,7 @@ export interface TagsInputProps { classNames?: { input?: string; tag?: string; + container?: string; }; } @@ -56,7 +57,7 @@ export const TagsInput = ({ } }, [value]); - const handleOnKeyUp = e => { + const handleOnKeyUp = (e) => { e.stopPropagation(); const text = e.target.value; @@ -84,14 +85,17 @@ export const TagsInput = ({ } }; - const onTagRemove = text => { - setTags(tags.filter(tag => tag !== text)); + const onTagRemove = (text) => { + setTags(tags.filter((tag) => tag !== text)); onRemoved && onRemoved(text); }; return ( -
- {tags.map(tag => ( +
+ {tags.map((tag) => (