mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-18 04:23:31 +01:00
fix: spacing of footer and affix
This commit is contained in:
@@ -221,7 +221,7 @@ export class ApiNodeJSONEncoder {
|
|||||||
model: ApiModel,
|
model: ApiModel,
|
||||||
item: ApiTypeParameterListMixin & ApiDeclaredItem,
|
item: ApiTypeParameterListMixin & ApiDeclaredItem,
|
||||||
version: string,
|
version: string,
|
||||||
) {
|
): ApiTypeParameterListJSON {
|
||||||
return {
|
return {
|
||||||
typeParameters: item.typeParameters.map((param) => generateTypeParamData(model, param, version, item.parent)),
|
typeParameters: item.typeParameters.map((param) => generateTypeParamData(model, param, version, item.parent)),
|
||||||
};
|
};
|
||||||
@@ -259,7 +259,7 @@ export class ApiNodeJSONEncoder {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
public static encodeFunction(model: ApiModel, item: ApiFunction, version: string) {
|
public static encodeFunction(model: ApiModel, item: ApiFunction, version: string): ApiFunctionJSON {
|
||||||
return {
|
return {
|
||||||
...this.encodeItem(model, item, version),
|
...this.encodeItem(model, item, version),
|
||||||
...this.encodeParameterList(model, item, version),
|
...this.encodeParameterList(model, item, version),
|
||||||
|
|||||||
@@ -304,7 +304,7 @@ export function SidebarLayout({
|
|||||||
height: 200,
|
height: 200,
|
||||||
background: theme.colorScheme === 'dark' ? theme.colors.dark![7] : theme.colors.gray![0],
|
background: theme.colorScheme === 'dark' ? theme.colors.dark![7] : theme.colors.gray![0],
|
||||||
paddingLeft: 324,
|
paddingLeft: 324,
|
||||||
paddingRight: 324,
|
paddingRight: data?.member?.kind !== 'Class' && data?.member?.kind !== 'Interface' ? 24 : 324,
|
||||||
|
|
||||||
[theme.fn.smallerThan('lg')]: {
|
[theme.fn.smallerThan('lg')]: {
|
||||||
paddingRight: 24,
|
paddingRight: 24,
|
||||||
|
|||||||
@@ -226,19 +226,6 @@ export default function SlugPage(props: Partial<SidebarLayoutProps & { error?: s
|
|||||||
<title key="title">{name}</title>
|
<title key="title">{name}</title>
|
||||||
</Head>
|
</Head>
|
||||||
{member(props.data.member)}
|
{member(props.data.member)}
|
||||||
<Affix position={{ bottom: 20, right: matches ? 20 : 280 }}>
|
|
||||||
<Transition transition="slide-up" mounted={scroll.y > 250}>
|
|
||||||
{(transitionStyles) => (
|
|
||||||
<Button
|
|
||||||
leftIcon={<VscChevronUp size={20} />}
|
|
||||||
style={transitionStyles}
|
|
||||||
onClick={() => scrollTo({ y: 0 })}
|
|
||||||
>
|
|
||||||
Scroll to top
|
|
||||||
</Button>
|
|
||||||
)}
|
|
||||||
</Transition>
|
|
||||||
</Affix>
|
|
||||||
</>
|
</>
|
||||||
) : props.data?.source ? (
|
) : props.data?.source ? (
|
||||||
<Box
|
<Box
|
||||||
@@ -259,6 +246,21 @@ export default function SlugPage(props: Partial<SidebarLayoutProps & { error?: s
|
|||||||
<MDXRemote {...props.data.source} />
|
<MDXRemote {...props.data.source} />
|
||||||
</Box>
|
</Box>
|
||||||
) : null}
|
) : null}
|
||||||
|
<Affix
|
||||||
|
position={{
|
||||||
|
bottom: 20,
|
||||||
|
right:
|
||||||
|
matches || (props.data?.member?.kind !== 'Class' && props.data?.member?.kind !== 'Interface') ? 20 : 280,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Transition transition="slide-up" mounted={scroll.y > 200}>
|
||||||
|
{(transitionStyles) => (
|
||||||
|
<Button leftIcon={<VscChevronUp size={20} />} style={transitionStyles} onClick={() => scrollTo({ y: 0 })}>
|
||||||
|
Scroll to top
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
|
</Transition>
|
||||||
|
</Affix>
|
||||||
</SidebarLayout>
|
</SidebarLayout>
|
||||||
</MemberProvider>
|
</MemberProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user