-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7f1018
commit a6c6a7a
Showing
10 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { useState } from 'react' | ||
import { ConfigProvider, SideBar } from '@nutui/nutui-react' | ||
|
||
const Demo6 = () => { | ||
const [value, setValue] = useState<number | string>('0') | ||
const list = Array.from(new Array(3).keys()) | ||
return ( | ||
<ConfigProvider theme={{ nutuiSidebarItemPadding: '0 0' }}> | ||
<SideBar | ||
style={{ height: 300 }} | ||
value={value} | ||
contentDuration={500} | ||
sidebarDuration={300} | ||
onChange={(value) => { | ||
setValue(value) | ||
}} | ||
> | ||
{list.map((item) => ( | ||
<SideBar.Item key={item} title={`Opt ${item + 1}`}> | ||
Content {item + 1} | ||
</SideBar.Item> | ||
))} | ||
</SideBar> | ||
</ConfigProvider> | ||
) | ||
} | ||
export default Demo6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React, { useState } from 'react' | ||
import { ConfigProvider, SideBar } from '@nutui/nutui-react-taro' | ||
|
||
const Demo6 = () => { | ||
const [value, setValue] = useState<number | string>('0') | ||
const list = Array.from(new Array(3).keys()) | ||
return ( | ||
<ConfigProvider theme={{ nutuiSidebarItemPadding: '0 0' }}> | ||
<SideBar | ||
style={{ height: 300 }} | ||
value={value} | ||
contentDuration={500} | ||
sidebarDuration={300} | ||
onChange={(value) => { | ||
setValue(value) | ||
}} | ||
> | ||
{list.map((item) => ( | ||
<SideBar.Item key={item} title={`Opt ${item + 1}`}> | ||
Content {item + 1} | ||
</SideBar.Item> | ||
))} | ||
</SideBar> | ||
</ConfigProvider> | ||
) | ||
} | ||
export default Demo6 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters