-
-
Notifications
You must be signed in to change notification settings - Fork 921
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Panel, Tree, CheckTree): add support for scrollShadow (#3818)
* feat(Panel): add support for scrollShadow * feat(Panel): add support for scrollShadow * fix: fix failed tests * feat(Tree,CheckTree): add support for scrollShadow * fix: fix failed tests
- Loading branch information
Showing
60 changed files
with
1,085 additions
and
407 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
24 changes: 24 additions & 0 deletions
24
docs/pages/components/check-tree/fragments/scroll-shadow.md
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,24 @@ | ||
<!--start-code--> | ||
|
||
```js | ||
import { CheckTree } from 'rsuite'; | ||
import { mockTreeData } from './mock'; | ||
|
||
const data = mockTreeData({ | ||
limits: [3, 3, 4], | ||
labels: (layer, value, faker) => { | ||
const methodName = ['jobArea', 'jobType', 'firstName']; | ||
return faker.person[methodName[layer]](); | ||
} | ||
}); | ||
|
||
const App = () => ( | ||
<> | ||
<CheckTree data={data} defaultExpandAll scrollShadow /> | ||
</> | ||
); | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); | ||
``` | ||
|
||
<!--end-code--> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
<!--start-code--> | ||
|
||
```js | ||
import { Panel, Placeholder } from 'rsuite'; | ||
|
||
const bodyProps = { | ||
style: { | ||
height: 300 | ||
} | ||
}; | ||
|
||
const App = () => ( | ||
<Panel header="Scroll Shadow" scrollShadow bodyProps={bodyProps}> | ||
<div style={{ padding: 20 }}> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
<Placeholder.Paragraph rows={20} graph="image" /> | ||
</div> | ||
</Panel> | ||
); | ||
|
||
ReactDOM.render(<App />, document.getElementById('root')); | ||
``` | ||
|
||
<!--end-code--> |
Oops, something went wrong.