saas-js / saas-ui

The React component library for startups, built with Chakra UI.
https://saas-ui.dev
MIT License
1.36k stars 131 forks source link

Can't import Sidebar #175

Closed FujiwaraChoki closed 1 year ago

FujiwaraChoki commented 1 year ago

I'm trying to import the Sidebar component, but it's telling me that it doesn't even exist...

Here's an img of the error: image

And here's the code:

import type { NextPage } from 'next'

import { LogoLight, LogoDark } from 'data/logo'
import { useColorModeValue } from '@chakra-ui/react'
import siteConfig from 'data/config'
import { Box } from '@chakra-ui/react'
import { AppShell, Sidebar, SidebarSection, NavItem } from '@saas-ui/react'

const Dashboard: NextPage = () => {
    const SC = siteConfig(useColorModeValue(LogoLight, LogoDark));

    return (
        <AppShell
            navbar={
                <Box as="header" borderBottomWidth="1px" py="2" px="4">
                    <SC.logo />
                </Box>
            }
            sidebar={
                <Sidebar>
                    <SidebarSection>
                        <NavItem>Home</NavItem>
                        <NavItem>Settings</NavItem>
                    </SidebarSection>
                </Sidebar>
            }
        >
            <Box as="main" flex="1" py="2" px="4" overflowY="auto">
                Your application content
            </Box>
        </AppShell>
    )
}

export default Dashboard;
Pagebakers commented 1 year ago

Which version of @saas-ui/react is installed?

FujiwaraChoki commented 1 year ago

This specific issue is gone, and the Select Component also works now that I updated the version, thanks 👍