-
Notifications
You must be signed in to change notification settings - Fork 138
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(comp:tag-group): add tagGroup component #836
Conversation
This preview will be available after the AzureCI is passed. |
92a9364
to
b138268
Compare
Codecov Report
@@ Coverage Diff @@
## main #836 +/- ##
==========================================
+ Coverage 93.26% 93.28% +0.02%
==========================================
Files 633 635 +2
Lines 60502 60758 +256
Branches 7229 7266 +37
==========================================
+ Hits 56426 56681 +255
- Misses 4076 4077 +1
Continue to review full report at Codecov.
|
b138268
to
e346b13
Compare
e346b13
to
575bde5
Compare
|
||
import { type TagGapSize, tagGroupProps } from './types' | ||
|
||
const defaultGapMap = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个干掉吧,这种只给一个 number 或者 string 的类型就算了,不给这种预设的值了。
@@ -271,6 +271,10 @@ export const defaultConfig: GlobalConfig = { | |||
}, | |||
}, | |||
tag: {}, | |||
tagGroup: { | |||
gap: 'sm', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gap: 'sm', | |
gap: 8, |
@@ -417,6 +418,11 @@ export interface TagConfig { | |||
shape?: TagShape | |||
} | |||
|
|||
export interface TagGroupConfig { | |||
gap: number | [number | string, number | string] | TagGapSize |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gap: number | [number | string, number | string] | TagGapSize | |
gap: number | string |
packages/components/tag/src/types.ts
Outdated
closable: IxPropTypes.bool.def(false), | ||
closeIcon: IxPropTypes.string.def('close'), | ||
dataSource: IxPropTypes.array<TagData>(), | ||
gap: IxPropTypes.oneOfType([Number, String, IxPropTypes.array<string | number>()]), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gap: IxPropTypes.oneOfType([Number, String, IxPropTypes.array<string | number>()]), | |
gap: IxPropTypes.oneOfType([Number, String), |
简单一点,不需要支持纵向的场景。
另外需要修改一下 test, 切换到 vitest 了。 |
a6dacf6
to
7730a98
Compare
7730a98
to
0481e4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
fix #826
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
What is the new behavior?
Other information