-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GDA: citations component override (#451)
Changes: - Added `CitationsContainer` prop to `<GenerativeDirectAnswer>` to allow custom components to be passed in - Updated test cases and test-site with new component passed through J=CLIP-1369 TEST=manual|auto Ran `npm run build`, `npm run test`, and `npm run wcag` and did manual testing on test-site
- Loading branch information
Showing
18 changed files
with
446 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) > [CitationCard](./search-ui-react.citationsprops.citationcard.md) | ||
|
||
## CitationsProps.CitationCard property | ||
|
||
The component for citation card | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
CitationCard?: (props: CitationProps) => JSX.Element | null; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) > [citationsHeader](./search-ui-react.citationsprops.citationsheader.md) | ||
|
||
## CitationsProps.citationsHeader property | ||
|
||
The header for the citations section generative direct answer. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
citationsHeader?: string | JSX.Element; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) > [cssClasses](./search-ui-react.citationsprops.cssclasses.md) | ||
|
||
## CitationsProps.cssClasses property | ||
|
||
CSS classes for customizing the component styling. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
cssClasses: GenerativeDirectAnswerCssClasses; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) > [gdaResponse](./search-ui-react.citationsprops.gdaresponse.md) | ||
|
||
## CitationsProps.gdaResponse property | ||
|
||
Response object containing generative direct answer info. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
gdaResponse: GenerativeDirectAnswerResponse; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) | ||
|
||
## CitationsProps interface | ||
|
||
Props for citations component. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
interface CitationsProps | ||
``` | ||
|
||
## Properties | ||
|
||
| Property | Modifiers | Type | Description | | ||
| --- | --- | --- | --- | | ||
| [CitationCard?](./search-ui-react.citationsprops.citationcard.md) | | (props: [CitationProps](./search-ui-react.citationprops.md)<!-- -->) => JSX.Element \| null | _(Optional)_ The component for citation card | | ||
| [citationsHeader?](./search-ui-react.citationsprops.citationsheader.md) | | string \| JSX.Element | _(Optional)_ The header for the citations section generative direct answer. | | ||
| [cssClasses](./search-ui-react.citationsprops.cssclasses.md) | | [GenerativeDirectAnswerCssClasses](./search-ui-react.generativedirectanswercssclasses.md) | CSS classes for customizing the component styling. | | ||
| [gdaResponse](./search-ui-react.citationsprops.gdaresponse.md) | | GenerativeDirectAnswerResponse | Response object containing generative direct answer info. | | ||
| [searchResults](./search-ui-react.citationsprops.searchresults.md) | | Result\[\] | Returned results relevant to the users' query to be used in Citations. | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [CitationsProps](./search-ui-react.citationsprops.md) > [searchResults](./search-ui-react.citationsprops.searchresults.md) | ||
|
||
## CitationsProps.searchResults property | ||
|
||
Returned results relevant to the users' query to be used in Citations. | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
searchResults: Result[]; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
docs/search-ui-react.generativedirectanswerprops.citationscontainer.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<!-- Do not edit this file. It is automatically generated by API Documenter. --> | ||
|
||
[Home](./index.md) > [@yext/search-ui-react](./search-ui-react.md) > [GenerativeDirectAnswerProps](./search-ui-react.generativedirectanswerprops.md) > [CitationsContainer](./search-ui-react.generativedirectanswerprops.citationscontainer.md) | ||
|
||
## GenerativeDirectAnswerProps.CitationsContainer property | ||
|
||
The component for citations container | ||
|
||
**Signature:** | ||
|
||
```typescript | ||
CitationsContainer?: (props: CitationsProps) => JSX.Element | null; | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.