-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-tags): Adds disabled property to TagGroup (#32317)
- Loading branch information
1 parent
4f4e54e
commit 0a88822
Showing
14 changed files
with
126 additions
and
11 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-tag-picker-9be006cd-1c03-46c8-a255-b35dd8971bee.json
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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "fix(react-tag-picker): allows TagPickerGroup to be disabled", | ||
"packageName": "@fluentui/react-tag-picker", | ||
"email": "jiangemma@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
7 changes: 7 additions & 0 deletions
7
change/@fluentui-react-tags-85ae0473-8232-428f-b0a7-cdb10bbd84df.json
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,7 @@ | ||
{ | ||
"type": "patch", | ||
"comment": "fix(react-tags): allows TagGroup to be disabled", | ||
"packageName": "@fluentui/react-tags", | ||
"email": "jiangemma@microsoft.com", | ||
"dependentChangeType": "patch" | ||
} |
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
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
53 changes: 53 additions & 0 deletions
53
packages/react-components/react-tags/stories/src/TagGroup/TagGroupDisabled.stories.tsx
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,53 @@ | ||
import * as React from 'react'; | ||
import { TagGroup, InteractionTag, InteractionTagPrimary, Tag, makeStyles } from '@fluentui/react-components'; | ||
|
||
const WithTags = () => ( | ||
<TagGroup disabled aria-label="Disabled tag group with Tag" role="list"> | ||
<Tag role="listitem">Tag 1</Tag> | ||
<Tag role="listitem">Tag 2</Tag> | ||
<Tag role="listitem">Tag 3</Tag> | ||
</TagGroup> | ||
); | ||
|
||
const WithInteractionTags = () => ( | ||
<TagGroup disabled aria-label="Disabled tag group with InteractionTag"> | ||
<InteractionTag> | ||
<InteractionTagPrimary>Tag 1</InteractionTagPrimary> | ||
</InteractionTag> | ||
<InteractionTag> | ||
<InteractionTagPrimary>Tag 2</InteractionTagPrimary> | ||
</InteractionTag> | ||
<InteractionTag> | ||
<InteractionTagPrimary>Tag 3</InteractionTagPrimary> | ||
</InteractionTag> | ||
</TagGroup> | ||
); | ||
|
||
const useStyles = makeStyles({ | ||
container: { | ||
display: 'flex', | ||
flexDirection: 'column', | ||
rowGap: '10px', | ||
}, | ||
}); | ||
|
||
export const Disabled = () => { | ||
const styles = useStyles(); | ||
return ( | ||
<div className={styles.container}> | ||
Disabled example with Tag: | ||
<WithTags /> | ||
Disabled example with InteractionTag: | ||
<WithInteractionTags /> | ||
</div> | ||
); | ||
}; | ||
|
||
Disabled.storyName = 'Disabled'; | ||
Disabled.parameters = { | ||
docs: { | ||
description: { | ||
story: 'A TagGroup can be disabled. The collection of Tag/InteractionTag will also be disabled.', | ||
}, | ||
}, | ||
}; |
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