Skip to content

Commit 786a28f

Browse files
committed
fix: support new alignment format
1 parent a9c54ee commit 786a28f

2 files changed

Lines changed: 2 additions & 9 deletions

File tree

web/src/components/Docs/SchemaEnum.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,6 @@ import {
1818
DeclarationNameLink,
1919
} from "./utils/styles";
2020

21-
const alignmentToType: Record<number, string> = {
22-
1: "uint8",
23-
2: "uint16",
24-
4: "uint32",
25-
8: "uint64",
26-
};
27-
2821
const EnumTypeWrapper = styled.span`
2922
font-size: 16px;
3023
font-weight: normal;
@@ -78,7 +71,7 @@ export const SchemaEnumView: React.FC<{
7871
{declaration.name}
7972
</DeclarationNameLink>
8073
<EnumTypeWrapper>
81-
: {alignmentToType[declaration.alignment] ?? `unknown(${declaration.alignment})`}
74+
: {declaration.alignment}
8275
</EnumTypeWrapper>
8376
<ModuleBadge module={declaration.module} />
8477
</CommonGroupSignature>

web/src/components/Docs/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export interface SchemaEnum {
3939
kind: "enum";
4040
name: string;
4141
module: string;
42-
alignment: number;
42+
alignment: string;
4343
members: SchemaEnumMember[];
4444
metadata: SchemaMetadataEntry[];
4545
}

0 commit comments

Comments
 (0)