Skip to content

Commit 71be084

Browse files
authored
fix(DataTag): add global (#7804)
1 parent 79dc769 commit 71be084

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

packages/ui-components/Common/DataTag/index.module.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,8 @@
4949
&.ctor {
5050
@apply bg-accent2-600;
5151
}
52+
53+
&.global {
54+
@apply bg-amber-600;
55+
}
5256
}

packages/ui-components/Common/DataTag/index.stories.tsx

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,16 @@ type Meta = MetaObj<typeof DataTag>;
88
export const DataTags: Story = {
99
render: () => (
1010
<div className="grid grid-cols-3 gap-6 p-6">
11-
{['event', 'method', 'property', 'class', 'module', 'classMethod', 'ctor']
11+
{[
12+
'event',
13+
'method',
14+
'property',
15+
'class',
16+
'module',
17+
'classMethod',
18+
'ctor',
19+
'global',
20+
]
1221
.map(kind =>
1322
['sm', 'md', 'lg'].map(size => (
1423
<div

packages/ui-components/Common/DataTag/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ export type DataTagProps = {
1111
| 'class'
1212
| 'module'
1313
| 'classMethod'
14+
| 'global'
1415
| 'ctor';
1516
size?: 'lg' | 'md' | 'sm';
1617
};
@@ -25,6 +26,7 @@ const symbolMap = {
2526
class: 'C',
2627
module: 'M',
2728
classMethod: 'S',
29+
global: 'G',
2830
ctor: 'C',
2931
} as const;
3032

0 commit comments

Comments
 (0)