Skip to content

Commit f5fcb0d

Browse files
committed
Fix Icon Button Color
1 parent 5e7f668 commit f5fcb0d

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

app/docs/[...slug]/page.tsx

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import { glob } from 'glob';
2+
3+
24
import DocumentationPage from "@/components/DocumentationPage";
35

4-
const RELATIVE_DOCS_PATH = '../../../docs';
6+
7+
8+
const RELATIVE_DOCS_PATH = '/docs';
59

610
export default async function Page({ params }: {
711
params: Promise<{ slug: string[] }>;
@@ -46,10 +50,12 @@ const importSlug = async (slug: string[]) => {
4650

4751
for (const ext of EXTENSIONS) {
4852
for (const file of FILES) {
49-
const fullPath = `${RELATIVE_DOCS_PATH}/${path}${file}.${ext}`;
53+
const fullPath = `${path}${file}.${ext}`;
5054
try {
51-
return await import(fullPath);
52-
} catch (e) {}
55+
return await import(`@/docs/${fullPath}`);
56+
} catch (e) {
57+
console.error(fullPath);
58+
}
5359
}
5460
}
5561

components/LabeledIconButton/LabeledIconButton.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,14 @@ interface LabeledIconButtonProps extends IconButtonProps {
1111
* IconButton with a small label below it in a vertical layout.
1212
*/
1313
const LabeledIconButton = ({label, href, ...props}: LabeledIconButtonProps) => {
14+
1415
return (
1516
<Link href={href}>
1617
<Box display={"flex"} flexDirection={"column"} alignItems={"center"}>
1718
<IconButton {...props} sx={{...props.sx, mb: -1}}>
1819
{props.children}
1920
</IconButton>
20-
<Typography variant="caption" display="block" textAlign="center">
21+
<Typography variant="caption" display="block" textAlign="center" sx={props.sx}>
2122
{label}
2223
</Typography>
2324
</Box>

0 commit comments

Comments
 (0)