File tree Expand file tree Collapse file tree 2 files changed +14
-8
lines changed
Expand file tree Collapse file tree 2 files changed +14
-8
lines changed Original file line number Diff line number Diff line change @@ -23,13 +23,11 @@ import {
2323 GridContent ,
2424 GridIcon ,
2525 MemberSignature ,
26+ SectionBadge ,
2627} from "./utils/styles" ;
2728
28- const EnumTypeWrapper = styled . span `
29- font-size: 16px;
30- font-weight: normal;
31- color: var(--text-dim);
32- margin-left: 8px;
29+ const AlignmentBadge = styled ( SectionBadge ) `
30+ color: var(--syntax-literal);
3331` ;
3432
3533const EnumMembers = styled ( CommonGroupMembers ) `
@@ -85,7 +83,7 @@ export const SchemaEnumView: React.FC<{
8583 < CommonGroupSignature >
8684 < KindIcon kind = "enum" size = "big" />
8785 < DeclarationNameLink to = { declPath } > { declaration . name } </ DeclarationNameLink >
88- < EnumTypeWrapper > : { declaration . alignment } </ EnumTypeWrapper >
86+ < AlignmentBadge > { declaration . alignment } </ AlignmentBadge >
8987 < ModuleBadge module = { declaration . module } />
9088 < GitHubFileLink module = { declaration . module } name = { declaration . name } />
9189 </ CommonGroupSignature >
Original file line number Diff line number Diff line change @@ -70,24 +70,32 @@ export const SectionList = styled.div`
7070 gap: 5px;
7171` ;
7272
73- export const SectionLink = styled ( Link ) `
73+ const sectionBadgeStyles = `
7474 display: inline-flex;
7575 align-items: center;
7676 gap: 6px;
7777 padding: 3px 10px;
7878 border-radius: 6px;
7979 font-size: 14px;
80- text-decoration: none;
8180 color: var(--text);
8281 background: var(--group-members);
8382 border: 1px solid var(--group-border);
83+ ` ;
84+
85+ export const SectionLink = styled ( Link ) `
86+ ${ sectionBadgeStyles }
87+ text-decoration: none;
8488 transition: border-color 0.1s;
8589
8690 &:hover {
8791 border-color: var(--highlight);
8892 }
8993` ;
9094
95+ export const SectionBadge = styled . span `
96+ ${ sectionBadgeStyles }
97+ ` ;
98+
9199export const SectionToggle = styled . button `
92100 background: none;
93101 border: none;
You can’t perform that action at this time.
0 commit comments