Comments (2)
useFoldingNavBarContext Hook
폴딩 기능을 사용할거라면?
- HeaderRightSection에 isFoldingMode props 추가
- NavBar에 items 넘겨주기
로고
언폴드(펼쳐진) 상태에서는 "로고"
폴드(접힌) 상태에서는 "심볼" 보여줘야하니까
아래 캡쳐처럼 isNavBarFolded 상태 값을 추적해서 상황에 맞게 아이콘 넘겨주세요.
items 데이터 예시
const MENUS = [
{
label: '대시보드',
icon: () => <FillDashboardIcon width={16} height={16} color="currentColor" />,
to: RoutePaths.대시보드,
},
{
label: '현장 관리',
icon: () => <FillBuildingIcon width={16} height={16} color="currentColor" />,
to: RoutePaths.현장관리,
},
{
label: '사용자 관리',
icon: () => <FillPersonIcon width={16} height={16} color="currentColor" />,
children: [
{
label: '사용자 현황',
to: RoutePaths.사용자관리_현황,
},
{
label: '사용자 통계',
to: RoutePaths.사용자관리_통계,
},
],
},
{
label: '기기 관리',
icon: () => <DeviceIcon />,
children: [
{
label: '기기 현황',
to: RoutePaths.기기관리_현황,
},
{
label: '기기 등록',
to: RoutePaths.기기관리_등록,
},
],
},
{
label: '라이센스 관리',
icon: () => <FillSettingIcon width={16} height={16} color="currentColor" />,
children: [
{
label: '현장 라이센스',
to: RoutePaths.라이센스관리_현장,
},
{
label: '기기 라이센스',
to: RoutePaths.라이센스관리_기기,
},
],
},
{
label: '플랫폼 관리',
icon: () => <CSCenterIcon />,
children: [
{
label: '시스템 에러',
to: RoutePaths.플랫폼관리_시스템에러,
},
{
label: '공지사항',
to: RoutePaths.플랫폼관리_공지사항,
},
{
label: '자주 묻는 질문',
to: RoutePaths.플랫폼관리_자주묻는질문,
},
{
label: '고객 문의',
to: RoutePaths.플랫폼관리_고객문의,
},
],
},
]
컴포넌트 사용 예시
<AppShell
header={
<Header>
<HeaderLeftSection
css={{
backgroundColor: theme.colors.blue.main,
}}
logo={<Typography color="white">Musma</Typography>}
></HeaderLeftSection>
<HeaderRightSection isFoldingMode>메뉴지롱 메롱메롱</HeaderRightSection>
</Header>
}
navBar={
<NavBar
items={MENUS}
css={{
svg: {
marginRight: 16,
},
}}
>
{/* NavBar에 items를 넘겼기때문에 아래 children 들은 무시됩니다 */}
<NavBarLink to="/" label="meme" />
<NavBarLink to="/" label="meme" />
</NavBar>
}
/>
⭐ ⭐ ⭐ libraries-test 에 예시 추가해뒀습니다! 사용법을 모르겠다면 참고해주세요 ⭐ ⭐ ⭐
from react-libraries.
2023-11-08.10.39.41.mov
from react-libraries.
Related Issues (20)
- regExp 수정
- fix: 빌드에러 HOT 1
- RadioGroup 컴포넌트에 disabled Props 추가
- useFormSearch 기능 수정
- useFormSearch, getFileSize 수정
- useFormSearch InitPageable props 추가
- pagination 버그 수정 HOT 1
- NPM 퍼블릭 배포 HOT 2
- eslint-config-react comment HOT 1
- useFullScreen bug HOT 1
- DateRangePicker 수정사항
- Flex , Table, Typography component 기능 추가 및 수정
- Docs 정리
- [FEATURE] 멀티 테마 기능 HOT 2
- [BUG] 한 페이지 안에서 두 개의 useFormSearch를 사용할 때, formState가 겹치는 문제
- [FEATURE] 화면에서 숫자를 표시할 때, 숫자 사이의 콤마를 찍는 유틸 함수 추가
- [BUG] 디자인 시스템 오적용 수정
- [BUG] 일부 기능 수정
- [BUG] 크롬 콘솔 내 aria-hidden 에러 메시지
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from react-libraries.