mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
HTML5 cite quoted Descriptions
This commit is contained in:
parent
85a1ea09a0
commit
a44aa3a179
3 changed files with 16 additions and 3 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import { Table } from 'antd';
|
||||
import * as React from "react";
|
||||
import { SubscribeButton } from '../../shared';
|
||||
import { SubscribeButton, Description } from '../../shared';
|
||||
import { nameof } from '../../utils';
|
||||
import './AllListsTable.css';
|
||||
import { List } from './List';
|
||||
|
|
@ -69,7 +69,7 @@ export class AllListsTable extends React.Component<{}, State> {
|
|||
<Table.Column<List>
|
||||
title="Description"
|
||||
dataIndex={nameof<List>("description")}
|
||||
render={(text: string) => <div>{text}</div>} />
|
||||
render={(text: string, record: List) => <Description desriptionSourceUrl={record.descriptionSourceUrl} desription={text} />} />
|
||||
<Table.Column<List>
|
||||
title="Software"
|
||||
dataIndex={nameof<List>("syntaxId")}
|
||||
|
|
|
|||
11
src/FilterLists.Web.V2/src/shared/Description.tsx
Normal file
11
src/FilterLists.Web.V2/src/shared/Description.tsx
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
import * as React from "react";
|
||||
|
||||
interface Props {
|
||||
desription: string;
|
||||
desriptionSourceUrl: string;
|
||||
};
|
||||
|
||||
export const Description = (props: Props): JSX.Element | null =>
|
||||
props.desriptionSourceUrl
|
||||
? <blockquote cite={props.desriptionSourceUrl}>{props.desription}</blockquote>
|
||||
: <p>{props.desription}</p>;
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
import { SubscribeButton } from './buttons';
|
||||
import { Description } from './Description';
|
||||
|
||||
export { SubscribeButton }
|
||||
export { SubscribeButton };
|
||||
export { Description };
|
||||
|
|
|
|||
Loading…
Reference in a new issue