Skip to content

Commit abc09e9

Browse files
committed
TableDropdown: add interface and update to named export, no-verify
1 parent 26c65c3 commit abc09e9

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

client/components/Dropdown/DropdownMenu.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { remSize, prop } from '../../theme';
44
import { useModalClose } from '../../common/useModalClose';
55
import DownArrowIcon from '../../images/down-filled-triangle.svg';
66

7-
enum DropdownMenuAlignment {
7+
export enum DropdownMenuAlignment {
88
RIGHT = 'right',
99
LEFT = 'left'
1010
}

client/components/Dropdown/TableDropdown.tsx

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import { prop, remSize } from '../../theme';
4-
import { DropdownMenu } from './DropdownMenu';
4+
import {
5+
DropdownMenu,
6+
DropdownMenuProps,
7+
DropdownMenuAlignment
8+
} from './DropdownMenu';
59

610
import DownFilledTriangleIcon from '../../images/down-filled-triangle.svg';
711
import MoreIconSvg from '../../images/more.svg';
@@ -20,8 +24,10 @@ const TableDropdownIcon = () => {
2024
);
2125
};
2226

23-
const TableDropdown = styled(DropdownMenu).attrs({
24-
align: 'right',
27+
export interface TableDropdownProps extends DropdownMenuProps {}
28+
29+
export const TableDropdown = styled(DropdownMenu).attrs<TableDropdownProps>({
30+
align: DropdownMenuAlignment.RIGHT,
2531
anchor: <TableDropdownIcon />
2632
})`
2733
& > button {
@@ -42,5 +48,3 @@ const TableDropdown = styled(DropdownMenu).attrs({
4248
right: calc(100% - 26px);
4349
}
4450
`;
45-
46-
export default TableDropdown;

client/modules/IDE/components/AssetListRow.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { useDispatch } from 'react-redux';
55
import { useTranslation } from 'react-i18next';
66
import prettyBytes from 'pretty-bytes';
77
import { MenuItem } from '../../../components/Dropdown/MenuItem';
8-
import TableDropdown from '../../../components/Dropdown/TableDropdown';
8+
import { TableDropdown } from '../../../components/Dropdown/TableDropdown';
99
import { deleteAssetRequest } from '../actions/assets';
1010

1111
const AssetMenu = ({ item: asset }) => {

client/modules/IDE/components/CollectionList/CollectionListRow.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { bindActionCreators } from 'redux';
66
import { withTranslation } from 'react-i18next';
77
import styled from 'styled-components';
88
import { MenuItem } from '../../../../components/Dropdown/MenuItem';
9-
import TableDropdown from '../../../../components/Dropdown/TableDropdown';
9+
import { TableDropdown } from '../../../../components/Dropdown/TableDropdown';
1010
import * as ProjectActions from '../../actions/project';
1111
import * as CollectionsActions from '../../actions/collections';
1212
import * as IdeActions from '../../actions/ide';

client/modules/IDE/components/SketchListRowBase.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { bindActionCreators } from 'redux';
66
import { connect } from 'react-redux';
77
import * as ProjectActions from '../actions/project';
88
import * as IdeActions from '../actions/ide';
9-
import TableDropdown from '../../../components/Dropdown/TableDropdown';
9+
import { TableDropdown } from '../../../components/Dropdown/TableDropdown';
1010
import { MenuItem } from '../../../components/Dropdown/MenuItem';
1111
import { formatDateToString } from '../../../utils/formatDate';
1212
import { getConfig } from '../../../utils/getConfig';

0 commit comments

Comments
 (0)