mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2025-10-16 12:05:41 +00:00
This is a common pitfall when writing definitions. See discussion here: https://github.com/DefinitelyTyped/DefinitelyTyped/pull/15526#issuecomment-322781094
21 lines
429 B
TypeScript
21 lines
429 B
TypeScript
import * as React from 'react';
|
|
import Sidebar, { SidebarStyles } from 'react-sidebar';
|
|
|
|
const sidebar = <ul><li>Item 1</li><li>Item 2</li></ul>;
|
|
|
|
const sidebarStyle: SidebarStyles = {
|
|
content: { width: "300px" }
|
|
};
|
|
|
|
const sidebar1 = (
|
|
<Sidebar
|
|
docked={true}
|
|
open={true}
|
|
sidebar={sidebar}
|
|
styles={sidebarStyle}
|
|
onSetOpen={() => {}}
|
|
>
|
|
<h1>Content</h1>
|
|
</Sidebar>
|
|
);
|