Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: using React.ReactNode as content type in InfoBar and Snackbar #435

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/components/InfoBar/InfoBar.types.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { IconName } from '../Icon';
import { ButtonProps } from '../Button';
import { OcBaseProps } from '../OcBase';
import React from 'react';

export type CloseButtonProps = Omit<ButtonProps, 'onClick' | 'icon'>;

Expand Down Expand Up @@ -52,7 +53,7 @@ export interface InfoBarsProps extends OcBaseProps<HTMLDivElement> {
/**
* Content of the InfoBar
*/
content: string;
content: React.ReactNode;
/**
* Custom icon for the InfoBar
* @default IconName.mdiInformation | IconName.mdiCheckCircle | IconName.mdiAlert
Expand Down
3 changes: 2 additions & 1 deletion src/components/Snackbar/Snackbar.types.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import React from 'react';
import { InfoBarsProps, InfoBarType } from '../InfoBar';

export type SnackbarPosition =
Expand All @@ -14,7 +15,7 @@ export interface SnackbarProps extends Omit<InfoBarsProps, 'onClick'> {
/**
* Content of the snackbar
*/
content: string;
content: React.ReactNode;
/**
* Duration for which the snackbar is shown
* @default 3000
Expand Down