mattermost-mobile/app/components/chips/selected_chip.tsx
Mattermost Build 9db6b0c89d
Add select user screen to select owner and task assignee (#9089) (#9124)
* Add select user screen to select owner and task assignee

* Fix i18n

* Add tests

* Address feedback

* Fix test

* Address UX feedback

* Fix test

* Put the no assignee button inline with the search

(cherry picked from commit a5d7bf7db4)

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2025-09-12 13:23:21 +03:00

34 lines
707 B
TypeScript

// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
// See LICENSE.txt for license information.
import React, {useCallback} from 'react';
import BaseChip from './base_chip';
type SelectedChipProps = {
id: string;
text: string;
onRemove: (id: string) => void;
testID?: string;
}
export default function SelectedChip({
id,
text,
onRemove,
testID,
}: SelectedChipProps) {
const onPress = useCallback(() => {
onRemove(id);
}, [onRemove, id]);
return (
<BaseChip
testID={testID}
onPress={onPress}
actionIcon='remove'
showAnimation={true}
label={text}
/>
);
}