✨ feat(vscode): 代码阅读的 React 钩子统一成一张钩子卡片,照签名排参数和返回,自定义钩子有自己的卡片
This commit is contained in:
1 parent
78d0c9dada
commit
e7059bcc73
17 files changed
+1409
-589
No files matched your search
@@ -150,6 +150,14 @@ describe('路由筛选后展开函数体', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('库规则卡片的淡底', () => {
|
||||
it('卡片给了 tint 时淡底用它、描边仍是种类色(React 钩子卡片按来源分底色):两个颜色都写在卡片上', () => {
|
||||
const tinted: BlockView = { ...view('0', 'react.hook', 'useRouter'), badge: BADGE, tint: { dark: '#e5c07b', light: '#9a6a00' } }
|
||||
expect(markup([tinted], tree())).toContain('data-kind="react.hook" data-badge="" data-tint="" style="--kind-dark:#61dafb;--kind-light:#0a7ea4;--tint-dark:#e5c07b;--tint-light:#9a6a00"')
|
||||
expect(markup([{ ...tinted, tint: undefined }], tree())).not.toContain('data-tint')
|
||||
})
|
||||
})
|
||||
|
||||
describe('挂在卡片子行上的子块', () => {
|
||||
it('默认不画,子行的名称是展开它的按钮;卡片收着时留下的子块不画', () => {
|
||||
const html = render({})
|
||||
|
||||
Reference in new issue
Block a user