-
Notifications
You must be signed in to change notification settings - Fork 119
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
16d6e5e
commit 53ea8e3
Showing
18 changed files
with
128 additions
and
884 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,40 @@ | ||
import { DefaultTag, DefaultTagCode } from './variant/DefaultTag' | ||
import { BothSideIconTag, BothSideIconTagCode } from './variant/BothSideIconTag' | ||
import { ColorsOfTag, ColorsOfTagCode } from './variant/ColorsOfTag' | ||
import { LeftSideIconTag, LeftSideIconTagCode } from './variant/LeftSideIconTag' | ||
import { TagWithDashedBorder, TagWithDashedBorderCode } from './variant/TagWithDashedBorder' | ||
import { TagWithIcon, TagWithIconCode } from './variant/TagWithIcon' | ||
import { DisabledTag, DisabledTagCode } from './variant/DisabledTag' | ||
import { tagApiData } from './TagApi' | ||
|
||
import CodePreview from '../../../components/CodePreview' | ||
|
||
import ComponentApi from '../../../components/ComponentApi' | ||
|
||
## Table of Contents | ||
|
||
The Color Tag Component in the Keep React allows you to visually represent and label items with different colors. With customizable options for the type, close button, color, and border, you can create color tags that align with your design and provide a clear visual distinction. | ||
The Color Tag Component in Keep React allows you to visually represent and label items with customizable options for style and icon. | ||
|
||
## Default Tag | ||
|
||
The Default Tag component represents a tag without any additional elements. It serves as a fundamental building block for various tag variations. | ||
The Default Tag component represents a tag without any additional elements. | ||
|
||
<CodePreview github="Tag" code={DefaultTagCode}> | ||
<DefaultTag /> | ||
</CodePreview> | ||
|
||
## Colors of Tag | ||
|
||
Customize the appearance of your tags by choosing from a range of color options. The "Colors of Tag" component showcases the available color variants. | ||
|
||
<CodePreview github="Tag" code={ColorsOfTagCode}> | ||
<ColorsOfTag /> | ||
</CodePreview> | ||
|
||
## Left Side Icon Tag | ||
|
||
Enhance your tags by adding an icon to the left side using the `leftIcon` props. | ||
|
||
<CodePreview github="Tag" code={LeftSideIconTagCode}> | ||
<LeftSideIconTag /> | ||
</CodePreview> | ||
|
||
## Tag With Both Side Icon | ||
## Tag With Icon | ||
|
||
Create tags with icons on both sides. The left side can accommodate a custom icon, while the right side features a dismiss icon for easy removal. | ||
Enhance your tags by adding icons for better visual representation. | ||
|
||
<CodePreview github="Tag" code={BothSideIconTagCode}> | ||
<BothSideIconTag /> | ||
<CodePreview github="Tag" code={TagWithIconCode}> | ||
<TagWithIcon /> | ||
</CodePreview> | ||
|
||
## Tag With Dashed Border | ||
## Disabled Tag | ||
|
||
The "Tag With Dashed Border" example demonstrates two types of border styles for tags: `borderType="solid"` and `borderType="dashed"`. | ||
Restrict user interaction with the `disabled` prop set to `true`. | ||
|
||
<CodePreview github="Tag" code={TagWithDashedBorderCode}> | ||
<TagWithDashedBorder /> | ||
<CodePreview github="Tag" code={DisabledTagCode}> | ||
<DisabledTag /> | ||
</CodePreview> | ||
|
||
## API Reference | ||
|
||
For a comprehensive overview of the Tag component's properties, refer to the API documentation. | ||
Refer to the API documentation for a comprehensive overview of the Tag component's properties. | ||
|
||
<ComponentApi data={tagApiData} /> |
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 |
---|---|---|
@@ -1,51 +1,16 @@ | ||
export const tagApiData = [ | ||
{ | ||
id: 1, | ||
propsName: 'leftIcon', | ||
propsType: 'ReactNode', | ||
propsDescription: 'Icon component displayed on the left side of the tag.', | ||
default: '<CrownSimple/>', | ||
}, | ||
{ | ||
id: 2, | ||
propsName: 'dismissIcon', | ||
propsType: 'ReactNode', | ||
propsDescription: 'Icon component used for dismissing the tag.', | ||
default: '<X/>', | ||
}, | ||
{ | ||
id: 3, | ||
propsName: 'dismiss', | ||
propsType: 'Boolean', | ||
propsDescription: 'Determines if the tag can be dismissed.', | ||
propsName: 'rounded', | ||
propsType: 'boolean', | ||
propsDescription: 'Tag with rounded corner', | ||
default: 'false', | ||
}, | ||
{ | ||
id: 4, | ||
id: 2, | ||
propsName: 'disabled', | ||
propsType: 'Boolean', | ||
propsDescription: 'Disables interactions with the tag.', | ||
default: 'false', | ||
}, | ||
{ | ||
id: 5, | ||
propsName: 'color', | ||
propsType: ['error', 'gray', 'info', 'success', 'warning', 'teal', 'purple'], | ||
propsDescription: 'Specifies the color variant of the tag.', | ||
default: 'gray', | ||
}, | ||
{ | ||
id: 6, | ||
propsName: 'borderType', | ||
propsType: ['solid', 'dashed'], | ||
propsDescription: 'Sets the type of border for the tag.', | ||
default: 'solid', | ||
}, | ||
{ | ||
id: 7, | ||
propsName: 'onDismiss', | ||
propsType: 'boolean | (() => void)', | ||
propsDescription: 'Callback function when the tag is dismissed.', | ||
default: 'Function', | ||
}, | ||
] |
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 was deleted.
Oops, something went wrong.
Oops, something went wrong.