Skip to content

Commit

Permalink
🎬 improve Dropdown context menu demo
Browse files Browse the repository at this point in the history
  • Loading branch information
afc163 committed Dec 10, 2019
1 parent 62839eb commit 20ef1f1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
8 changes: 4 additions & 4 deletions components/dropdown/__tests__/__snapshots__/demo.test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ exports[`renders ./components/dropdown/demo/basic.md correctly 1`] = `
`;

exports[`renders ./components/dropdown/demo/context-menu.md correctly 1`] = `
<span
<div
class="ant-dropdown-trigger"
style="user-select:none"
style="text-align:center;background:#f7f7f7;height:200px;line-height:200px;color:#777"
>
Right Click on Me
</span>
Right Click on here
</div>
`;

exports[`renders ./components/dropdown/demo/dropdown-button.md correctly 1`] = `
Expand Down
12 changes: 11 additions & 1 deletion components/dropdown/demo/context-menu.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,17 @@ const menu = (

ReactDOM.render(
<Dropdown overlay={menu} trigger={['contextMenu']}>
<span style={{ userSelect: 'none' }}>Right Click on Me</span>
<div
style={{
textAlign: 'center',
background: '#f7f7f7',
height: 200,
lineHeight: '200px',
color: '#777',
}}
>
Right Click on here
</div>
</Dropdown>,
mountNode,
);
Expand Down

0 comments on commit 20ef1f1

Please sign in to comment.