mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
## Summary This PR versions the `cases` and `comment` domain objects and their corresponding APIs. It was not possible to do them separately as I got errors due to circular dependencies. ## Notable Changes - The `Comment` type was renamed to `Attachment` - The `Comments` type was renamed to `Attachments` - The `*CommentRequestRt` type was renamed to `*AttachmentPayload` - The `CommentType` type was renamed to `AttachmentType` - The `AttributesType*` type was renamed to `*AttachmentAttributes` - The `*ResponseTypeUserRt` type was renamed to `*AttachmentRt` - The word `comment` got replaced with the word `attachment` in all types - The `RelatedCaseInfo` type was renamed to `RelatedCase` - The `CasesByAlertId` type was renamed to `GetRelatedCasesByAlertResponse` Depends on: https://github.com/elastic/kibana/pull/161783, https://github.com/elastic/kibana/pull/162059 ### Checklist Delete any items that do not apply to this PR. - [x] [Unit or functional tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html) were updated or added to match the most common scenarios ### For maintainers - [x] This was checked for breaking API changes and was [labeled appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> |
||
---|---|---|
.. | ||
.storybook | ||
src | ||
index.ts | ||
jest.config.js | ||
kibana.jsonc | ||
package.json | ||
README.md | ||
setup_tests.ts | ||
tsconfig.json |
@kbn/cases-components
The package exports a collection of pure Cases components.
Components
Status
The component renders the status of a case. Usage:
import { Status, CaseStatuses } from '@kbn/cases-components';
<Status status={CaseStatuses.open} />
Tooltip
The component renders the tooltip with case details on hover of an Element. Usage:
import { Tooltip, CaseStatuses } from '@kbn/cases-components';
import type { CaseTooltipContentProps, CaseTooltipProps } from '@kbn/cases-components';
const tooltipContent: CaseTooltipContentProps = {
title: 'Case title',
description: 'Case description',
createdAt: '2020-02-19T23:06:33.798Z',
createdBy: {
fullName: 'Elastic User',
username: 'elastic',
},
totalComments: 1,
status: CaseStatuses.open,
}
const tooltipProps: CaseTooltipProps = {
loading: false,
content: tooltipContent,
className: 'customClass',
};
<Tooltip {...tooltipProps}>
<span>This is a demo span</span>
</Tooltip>