Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ import * as React from "react";
import { useState } from "react";
import {
Badge,
Body1Strong,
Combobox,
Link,
Option,
OptionGroup,
Spinner,
Expand All @@ -14,7 +12,6 @@ import { GroupByTag } from "../../../../utils/react/TableListInfo";
import { Pagination } from "../../../../utils/react/Pagination";
import * as Constants from "../../../../../constants";
import { Api } from "../../../../../models/api";
import { TApiListRuntimeFCProps } from "./ApiListRuntime";
import {
isApisGrouped,
TagGroupToggleBtn,
Expand All @@ -23,6 +20,7 @@ import {
} from "./utils";
import { RouteHelper } from "../../../../../routing/routeHelper";
import { ApiService } from "../../../../../services/apiService";
import { TApiListRuntimeFCProps } from "./ApiListRuntime";

type TApiListDropdown = Omit<
TApiListRuntimeFCProps,
Expand Down Expand Up @@ -71,7 +69,7 @@ const Options = ({
<>
{apis.map((api) => (
<Option key={api.id} value={api.name} text={api.displayName}>
<Link href={getReferenceUrl(api.name)} appearance="subtle">{api.displayName}</Link>{" "}
<a href={getReferenceUrl(api.name)} className="dropdown-link">{api.displayName}</a>{" "}
<ApiTypeBadge api={api} /> <ApiVersionBadge api={api} />
</Option>
))}
Expand Down Expand Up @@ -175,7 +173,7 @@ const ApiListDropdownFC = ({

return (
<>
<Body1Strong block>API</Body1Strong>
<span className="strong">API</span>
<div style={{ padding: ".25rem 0 1rem" }}>{content}</div>
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import * as React from "react";
import { Button, Link, Subtitle1 } from "@fluentui/react-components";
import { Stack } from "@fluentui/react";
import { Product } from "../../../../../models/product";
import { TProductsData } from "./utils";
import { MarkdownProcessor } from "../../../../utils/react/MarkdownProcessor";
import { markdownMaxCharsMap } from "../../../../../constants";
import { MarkdownProcessor } from "../../../../utils/react/MarkdownProcessor";
import { TProductsData } from "./utils";

type Props = {
getReferenceUrl: (productName: string) => string;
Expand All @@ -13,18 +13,21 @@ const ProductCard = ({ product, getReferenceUrl }: Props & { product: Product })
return (
<div className={"fui-list-card"}>
<div style={{ height: "100%" }}>
<Subtitle1>{product.displayName}</Subtitle1>
<h4>{product.displayName}</h4>

<MarkdownProcessor markdownToDisplay={product.description} maxChars={markdownMaxCharsMap.cards} />
</div>

<div>
<Link href={getReferenceUrl(product.name)} title={product.displayName}>
<Button appearance={"outline"}>
Go to Product
</Button>
</Link>
</div>
<Stack horizontal>
<a
href={getReferenceUrl(product.name)}
title={product.displayName}
role="button"
className="button"
>
Go to Product
</a>
</Stack>
</div>
);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
import * as React from "react";
import { useState } from "react";
import {
Body1Strong,
Combobox,
Link,
Option,
Spinner,
} from "@fluentui/react-components";
Expand Down Expand Up @@ -36,7 +34,7 @@ const Options = ({
<>
{products.map((product) => (
<Option key={product.id} value={product.name} text={product.displayName}>
<Link href={getReferenceUrl(product.name)} appearance="subtle">{product.displayName}</Link>
<a href={getReferenceUrl(product.name)} className="dropdown-link">{product.displayName}</a>
</Option>
))}
</>
Expand Down Expand Up @@ -100,7 +98,7 @@ const ProductsDropdownFC = ({

return (
<>
<Body1Strong block>Product</Body1Strong>
<span className="strong">Product</span>
<div style={{ padding: ".25rem 0 1rem" }}>{content}</div>
</>
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as React from "react";
import {
Body1Strong,
Link,
Table,
TableBody,
TableCell,
Expand All @@ -25,9 +23,9 @@ const TableBodyProducts = ({ products, getReferenceUrl }: Props & { products: Pr
? products.map((product) => (
<TableRow key={product.id}>
<TableCell>
<Link href={getReferenceUrl(product.name)} title={product.displayName}>
<a href={getReferenceUrl(product.name)} title={product.displayName}>
{product.displayName}
</Link>
</a>
</TableCell>
<TableCell style={{padding: ".5rem 0"}}>
<MarkdownProcessor markdownToDisplay={product.description} maxChars={markdownMaxCharsMap.table} />
Expand All @@ -44,10 +42,10 @@ export const ProductsTable = ({ products, getReferenceUrl }: Props & { products:
<TableHeader>
<TableRow className={"fui-table-headerRow"}>
<TableHeaderCell>
<Body1Strong>Name</Body1Strong>
<span className="strong">Name</span>
</TableHeaderCell>
<TableHeaderCell>
<Body1Strong>Description</Body1Strong>
<span className="strong">Description</span>
</TableHeaderCell>
</TableRow>
</TableHeader>
Expand Down
8 changes: 8 additions & 0 deletions src/themes/website/styles/text.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,11 @@ span.strong {
span.caption1 {
font-size: .9em;
}

a.dropdown-link {
color: inherit;

&:hover {
color: inherit;
}
}