forked from elastic/eui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Convert EuiFlex* and EuiDescriptionList* to typescript (elastic#1365)
* Converted EuiFlexGrid, EuiFlexGroup, and EuiFlexItem to typescript. Converted unit test helpers to typescript. * Converted flex/index.js to TS * Converted EuiDescriptionList* to typescript * Converted EuiFlex* docs to typescript * Support null & undefined as proptype literals * changelog * feedback * Update scripts/babel/proptypes-from-ts-props/index.js Co-Authored-By: chandlerprall <[email protected]> * Update scripts/babel/proptypes-from-ts-props/index.js Co-Authored-By: chandlerprall <[email protected]> * Make title and description prop values non-nullable * finish merging in master
- Loading branch information
1 parent
7ce11d3
commit a74e0e0
Showing
72 changed files
with
742 additions
and
1,250 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
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
10 changes: 5 additions & 5 deletions
10
src-docs/src/views/flex/component_span.js → src-docs/src/views/flex/component_span.tsx
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
5 changes: 1 addition & 4 deletions
5
src-docs/src/views/flex/direction.js → src-docs/src/views/flex/direction.tsx
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 was deleted.
Oops, something went wrong.
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,33 @@ | ||
import React from 'react'; | ||
|
||
import { EuiFlexGrid, EuiFlexItem } from '../../../../src/components/flex'; | ||
|
||
const ITEM_STYLE = { width: '300px' }; | ||
|
||
export default () => ( | ||
<div> | ||
<EuiFlexGrid> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>One</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Two</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Three</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Four</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Five</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Six</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem style={ITEM_STYLE}> | ||
<div>Seven</div> | ||
</EuiFlexItem> | ||
</EuiFlexGrid> | ||
</div> | ||
); |
This file was deleted.
Oops, something went wrong.
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,31 @@ | ||
import React from 'react'; | ||
|
||
import { EuiFlexGrid, EuiFlexItem } from '../../../../src/components/flex'; | ||
|
||
export default () => ( | ||
<div> | ||
<EuiFlexGrid columns={3}> | ||
<EuiFlexItem> | ||
<div>One</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Two</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Three</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Four</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Five</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Six</div> | ||
</EuiFlexItem> | ||
<EuiFlexItem> | ||
<div>Seven</div> | ||
</EuiFlexItem> | ||
</EuiFlexGrid> | ||
</div> | ||
); |
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
import React from 'react'; | ||
|
||
import { EuiFlexGroup, EuiFlexItem } from '../../../../src/components/flex'; | ||
import { EuiSpacer } from '../../../../src/components/spacer'; | ||
|
||
export default () => ( | ||
<EuiFlexGroup> | ||
<EuiFlexItem>Content grid item</EuiFlexItem> | ||
<EuiFlexItem> | ||
<p>Another content grid item</p> | ||
<EuiSpacer /> | ||
<p> | ||
Note how both of these are the same width and height despite having | ||
different content? | ||
</p> | ||
</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); |
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import React from 'react'; | ||
|
||
import { EuiFlexGroup, EuiFlexItem } from '../../../../src/components/flex'; | ||
|
||
export default () => ( | ||
<EuiFlexGroup wrap> | ||
<EuiFlexItem style={{ minWidth: 300 }}>Min-width 300px</EuiFlexItem> | ||
|
||
<EuiFlexItem style={{ minWidth: 300 }}>Min-width 300px</EuiFlexItem> | ||
|
||
<EuiFlexItem style={{ minWidth: 300 }}>Min-width 300px</EuiFlexItem> | ||
</EuiFlexGroup> | ||
); |
17 changes: 10 additions & 7 deletions
17
src-docs/src/views/flex/flex_grow_numeric.js → ...docs/src/views/flex/flex_grow_numeric.tsx
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
5 changes: 1 addition & 4 deletions
5
src-docs/src/views/flex/flex_grow_zero.js → src-docs/src/views/flex/flex_grow_zero.tsx
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
7 changes: 2 additions & 5 deletions
7
src-docs/src/views/flex/flex_gutter.js → src-docs/src/views/flex/flex_gutter.tsx
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
5 changes: 1 addition & 4 deletions
5
src-docs/src/views/flex/flex_items.js → src-docs/src/views/flex/flex_items.tsx
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
6 changes: 3 additions & 3 deletions
6
src-docs/src/views/flex/flex_nest.js → src-docs/src/views/flex/flex_nest.tsx
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
Oops, something went wrong.