Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Converts NavDrawer, NavDrawerGroup, and NavDrawerFlyout to TypeScript #3268

Merged
merged 7 commits into from
Apr 13, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## [`master`](https://github.com/elastic/eui/tree/master)

No public interface changes since `22.5.0`.
- Converted `NavDrawer`, `NavDrawerGroup`, and `NavDrawerFlyout` to TypeScript ([#3268](https://github.com/elastic/eui/pull/3268))

## [`22.5.0`](https://github.com/elastic/eui/tree/v22.5.0)

Expand Down
2 changes: 1 addition & 1 deletion src/components/list_group/list_group_item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export type EuiListGroupItemProps = CommonProps &
* Pass-through ref reference specifically for targeting
* instances where the item content is rendered as a `button`
*/
buttonRef?: React.RefObject<HTMLButtonElement>;
buttonRef?: React.Ref<HTMLButtonElement>;
dimitropoulos marked this conversation as resolved.
Show resolved Hide resolved
};

export const EuiListGroupItem: FunctionComponent<EuiListGroupItemProps> = ({
Expand Down
5 changes: 0 additions & 5 deletions src/components/nav_drawer/index.js

This file was deleted.

6 changes: 6 additions & 0 deletions src/components/nav_drawer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export { EuiNavDrawer, EuiNavDrawerProps } from './nav_drawer';
export { EuiNavDrawerGroup, EuiNavDrawerGroupProps } from './nav_drawer_group';
export {
EuiNavDrawerFlyout,
EuiNavDrawerFlyoutProps,
} from './nav_drawer_flyout';
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,16 @@ import React from 'react';
import { render } from 'enzyme';

import { EuiNavDrawer } from './nav_drawer';
import { EuiNavDrawerGroup } from './nav_drawer_group';
import { EuiNavDrawerGroup, FlyoutMenuItem } from './nav_drawer_group';
import { EuiListGroupItemProps } from '../list_group';

const extraAction = {
const extraAction: EuiListGroupItemProps['extraAction'] = {
color: 'subdued',
iconType: 'pin',
iconSize: 's',
};

const topLinks = [
const topLinks: FlyoutMenuItem[] = [
{
label: 'Recently viewed',
iconType: 'clock',
Expand Down Expand Up @@ -74,7 +75,7 @@ const topLinks = [
},
];

const exploreLinks = [
const exploreLinks: FlyoutMenuItem[] = [
{
label: 'Canvas',
href: '#',
Expand Down
Loading