-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow some special characters on TagsQuery component
- Loading branch information
Alejandro Hernandez
committed
Apr 1, 2024
1 parent
dab6493
commit 2bdceb0
Showing
6 changed files
with
81 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import _ from 'lodash/fp.js' | ||
import React from 'react' | ||
import TagsInput from './TagsInput.js' | ||
|
||
export default { | ||
component: TagsInput, | ||
} | ||
|
||
export const Default = () => { | ||
let [tags, setTags] = React.useState([ | ||
'janitor', | ||
'soap', | ||
'cleaner', | ||
'cleaning', | ||
'clean', | ||
]) | ||
return ( | ||
<TagsInput | ||
tags={tags} | ||
addTags={(tags) => setTags((current) => _.union(tags, current))} | ||
removeTag={(tag) => setTags((current) => _.pull(tag, current))} | ||
tagStyle={{ background: 'lavender' }} | ||
/> | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters