just some 🧹 api cleaning
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
This commit is contained in:
@@ -31,13 +31,7 @@ export const adrPlugin: BackstagePlugin<
|
||||
|
||||
// @public
|
||||
export const AdrReader: {
|
||||
({
|
||||
adr,
|
||||
decorators,
|
||||
}: {
|
||||
adr: string;
|
||||
decorators?: AdrContentDecorator[] | undefined;
|
||||
}): JSX.Element;
|
||||
(props: { adr: string; decorators?: AdrContentDecorator[] }): JSX.Element;
|
||||
decorators: Readonly<{
|
||||
createRewriteRelativeLinksDecorator(): AdrContentDecorator;
|
||||
createRewriteRelativeEmbedsDecorator(): AdrContentDecorator;
|
||||
@@ -45,23 +39,15 @@ export const AdrReader: {
|
||||
};
|
||||
|
||||
// @public
|
||||
export const AdrSearchResultListItem: ({
|
||||
lineClamp,
|
||||
highlight,
|
||||
rank,
|
||||
result,
|
||||
}: {
|
||||
lineClamp?: number | undefined;
|
||||
highlight?: ResultHighlight | undefined;
|
||||
rank?: number | undefined;
|
||||
export function AdrSearchResultListItem(props: {
|
||||
lineClamp?: number;
|
||||
highlight?: ResultHighlight;
|
||||
rank?: number;
|
||||
result: AdrDocument;
|
||||
}) => JSX.Element;
|
||||
}): JSX.Element;
|
||||
|
||||
// @public
|
||||
export const EntityAdrContent: ({
|
||||
contentDecorators,
|
||||
filePathFilterFn,
|
||||
}: {
|
||||
export const EntityAdrContent: (props: {
|
||||
contentDecorators?: AdrContentDecorator[] | undefined;
|
||||
filePathFilterFn?: AdrFilePathFilterFn | undefined;
|
||||
}) => JSX.Element;
|
||||
|
||||
@@ -32,15 +32,14 @@ import { AdrContentDecorator } from './types';
|
||||
|
||||
/**
|
||||
* Component to fetch and render an ADR.
|
||||
*
|
||||
* @public
|
||||
*/
|
||||
export const AdrReader = ({
|
||||
adr,
|
||||
decorators,
|
||||
}: {
|
||||
export const AdrReader = (props: {
|
||||
adr: string;
|
||||
decorators?: AdrContentDecorator[];
|
||||
}) => {
|
||||
const { adr, decorators } = props;
|
||||
const { entity } = useEntity();
|
||||
const scmIntegrations = useApi(scmIntegrationsApiRef);
|
||||
const adrLocationUrl = getAdrLocationUrl(entity, scmIntegrations);
|
||||
|
||||
@@ -58,13 +58,11 @@ const useStyles = makeStyles((theme: Theme) => ({
|
||||
* Component for browsing ADRs on an entity page.
|
||||
* @public
|
||||
*/
|
||||
export const EntityAdrContent = ({
|
||||
contentDecorators,
|
||||
filePathFilterFn,
|
||||
}: {
|
||||
export const EntityAdrContent = (props: {
|
||||
contentDecorators?: AdrContentDecorator[];
|
||||
filePathFilterFn?: AdrFilePathFilterFn;
|
||||
}) => {
|
||||
const { contentDecorators, filePathFilterFn } = props;
|
||||
const classes = useStyles();
|
||||
const { entity } = useEntity();
|
||||
const rootLink = useRouteRef(rootRouteRef);
|
||||
|
||||
@@ -43,20 +43,16 @@ const useStyles = makeStyles({
|
||||
});
|
||||
|
||||
/**
|
||||
* A component to display a ADR search result
|
||||
* A component to display an ADR search result.
|
||||
* @public
|
||||
*/
|
||||
export const AdrSearchResultListItem = ({
|
||||
lineClamp = 5,
|
||||
highlight,
|
||||
rank,
|
||||
result,
|
||||
}: {
|
||||
export function AdrSearchResultListItem(props: {
|
||||
lineClamp?: number;
|
||||
highlight?: ResultHighlight;
|
||||
rank?: number;
|
||||
result: AdrDocument;
|
||||
}) => {
|
||||
}) {
|
||||
const { lineClamp = 5, highlight, rank, result } = props;
|
||||
const classes = useStyles();
|
||||
const analytics = useAnalytics();
|
||||
|
||||
@@ -122,4 +118,4 @@ export const AdrSearchResultListItem = ({
|
||||
<Divider component="li" />
|
||||
</Link>
|
||||
);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user