diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.module.css similarity index 97% rename from src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css rename to src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.module.css index 5a637ae03..600fd2ecb 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.css +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.module.css @@ -1,4 +1,4 @@ -td > * { +.nogrow > * { /* limit table cells from wrapping more than 2 lines */ /* https://stackoverflow.com/a/13924997/2343739 */ /* https://stackoverflow.com/a/22042054/2343739 */ diff --git a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx index c4d719e76..d3475e174 100644 --- a/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx +++ b/src/FilterLists.Web.V2/src/modules/allListsTable/AllListsTable.tsx @@ -2,7 +2,7 @@ import { Table } from 'antd'; import React from 'react'; import { Description, SubscribeButton, TagCloud } from '../../shared'; import { nameof } from '../../utils'; -import './AllListsTable.css'; +import styles from './AllListsTable.module.css'; import { List } from './List'; import { Tag } from './Tag'; @@ -78,30 +78,36 @@ export class AllListsTable extends React.Component<{}, State> { sorter={(a, b) => a.name.localeCompare(b.name)} defaultSortOrder={"ascend"} width={200} + className={styles.nogrow} fixed="left" render={(text: string) =>
{text}
} /> title="Description" dataIndex={nameof("description")} + className={styles.nogrow} render={(text: string, record: List) => } /> title="Software" dataIndex={nameof("syntaxId")} + className={styles.nogrow} render={(text: string) =>
{text}
} /> title="Languages" dataIndex={nameof("languageIds")} + className={styles.nogrow} render={(text: string) =>
{text}
} /> title="Tags" dataIndex={nameof("tagIds")} - width={200} + width={275} + className={styles.nogrow} render={(tagIds: number[]) => tagIds ? tagIds.includes(t.id))} /> : null} /> title="Subscribe" dataIndex={nameof("viewUrl")} width={123} + className={styles.nogrow} fixed={this.state.isNarrowWindow ? undefined : "right"} render={(text: string, record: List, index: number) => } /> diff --git a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.css b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.module.css similarity index 55% rename from src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.css rename to src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.module.css index 3106850cc..185d96c4f 100644 --- a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.css +++ b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.module.css @@ -1,10 +1,9 @@ /* fix font color on dropdown buttons */ -.ant-dropdown-menu-item > a, -.ant-dropdown-menu-submenu-title > a { - color: #fff; +.sub { + color: #fff !important; } /* make non-dropdown button equivalent width to dropdown */ -.ant-btn.single { +.single { width: 106.81px; } diff --git a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx index fbc0a72ab..f3c6524e3 100644 --- a/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx +++ b/src/FilterLists.Web.V2/src/shared/buttons/subscribe/SubscribeButton.tsx @@ -1,7 +1,7 @@ import { Button, Dropdown, Menu } from 'antd'; import { ButtonProps, ButtonType } from "antd/lib/button"; import React from 'react'; -import './SubscribeButton.css'; +import styles from './SubscribeButton.module.css'; //TODO: import DropdownButtonType from antd rather than redefining if they export the type //import { DropdownButtonType } from "antd/lib/dropdown"; @@ -17,7 +17,7 @@ export const SubscribeButton = (props: Props): JSX.Element => (props.viewUrlMirrors && props.viewUrlMirrors.length > 0) ? :
- +
; const SubscribeButtonDropdown = (props: Props): JSX.Element => { @@ -30,7 +30,7 @@ const SubscribeButtonDropdown = (props: Props): JSX.Element => { {props.viewUrlMirrors.map((viewUrlMirror: string, i: number) => - + )} }> diff --git a/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css index 42f8db99a..3bee840b6 100644 --- a/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css +++ b/src/FilterLists.Web.V2/src/shared/tagCloud/TagCloud.module.css @@ -1,3 +1,4 @@ +/* allow for 2nd row's tags' bottom border to not be chopped in AllListsTable */ .grow { max-height: none !important; }