(core) Add AI assistant usage banners

Summary:
Banners are now shown when there are low or no AI assistant
credits remaining.

Test Plan: Browser tests.

Reviewers: jarek

Reviewed By: jarek

Differential Revision: https://phab.getgrist.com/D4018
This commit is contained in:
George Gevoian
2023-08-30 11:58:18 -04:00
parent 98068cb86c
commit 70feb336d9
6 changed files with 178 additions and 69 deletions

View File

@@ -43,14 +43,14 @@ export interface BannerOptions {
/**
* If provided, applies the css class to the banner container.
*/
bannerCssClass?: string;
bannerCssClass?: string;
/**
* Function that is called when the banner close button is clicked.
*
* Should be used to handle disposal of the Banner.
*/
onClose?(): void;
onClose?(): void;
}
/**
@@ -134,6 +134,16 @@ const cssBanner = styled('div', `
}
`);
export const cssBannerLink = styled('span', `
cursor: pointer;
color: unset;
text-decoration: underline;
&:hover, &:focus {
color: unset;
}
`);
const cssButtons = styled('div', `
display: flex;
gap: 16px;