import { Detail } from "@raycast/api";
// Define markdown here to prevent unwanted indentation.
const markdown = `
# Pikachu

Pikachu that can generate powerful electricity have cheek sacs that are extra soft and super stretchy.
`;
export default function Main() {
return (
<Detail
markdown={markdown}
navigationTitle="Pikachu"
metadata={
<Detail.Metadata>
<Detail.Metadata.Label title="Height" text={`1' 04"`} />
<Detail.Metadata.Label title="Weight" text="13.2 lbs" />
<Detail.Metadata.TagList title="Type">
<Detail.Metadata.TagList.Item text="Electric" color={"#eed535"} />
</Detail.Metadata.TagList>
<Detail.Metadata.Separator />
<Detail.Metadata.Link title="Evolution" target="https://www.pokemon.com/us/pokedex/pikachu" text="Raichu" />
</Detail.Metadata>
}
/>
);
}
参数
名称
描述
类型
默认
children*
元数据视图的元素。
React.ReactNode
-
Detail.Metadata.Label
带有可选图标的单个值。
例子
import { Detail } from "@raycast/api";
// Define markdown here to prevent unwanted indentation.
const markdown = `
# Pikachu

Pikachu that can generate powerful electricity have cheek sacs that are extra soft and super stretchy.
`;
export default function Main() {
return (
<Detail
markdown={markdown}
navigationTitle="Pikachu"
metadata={
<Detail.Metadata>
<Detail.Metadata.Label title="Height" text={`1' 04"`} icon="weight.svg" />
</Detail.Metadata>
}
/>
);
}
参数
名称
描述
类型
默认
title*
项目的标题。
string
-
icon
项目的图标。
-
text
-
Detail.Metadata.Link
显示链接的项目。
例子
import { Detail } from "@raycast/api";
// Define markdown here to prevent unwanted indentation.
const markdown = `
# Pikachu

Pikachu that can generate powerful electricity have cheek sacs that are extra soft and super stretchy.
`;
export default function Main() {
return (
<Detail
markdown={markdown}
navigationTitle="Pikachu"
metadata={
<Detail.Metadata>
<Detail.Metadata.Link title="Evolution" target="https://www.pokemon.com/us/pokedex/pikachu" text="Raichu" />
</Detail.Metadata>
}
/>
);
}