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: added exports for settings props #107

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Changes from all commits
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
10 changes: 5 additions & 5 deletions src/components/Settings/Settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

const b = block('settings');

interface SettingsProps {
export interface SettingsProps {
children: React.ReactNode;
title?: string;
filterPlaceholder?: string;
Expand All @@ -31,28 +31,28 @@
onClose?: () => void;
}

interface SettingsGroupProps {
export interface SettingsGroupProps {
id?: string;
groupTitle: string;
children: React.ReactNode;
}

interface SettingsPageProps {
export interface SettingsPageProps {
id?: string;
title: string;
icon?: IconProps;
children: React.ReactNode;
}

interface SettingsSectionProps {
export interface SettingsSectionProps {
title: string;
header?: React.ReactNode;
children: React.ReactNode;
withBadge?: boolean;
showTitle?: boolean;
}

interface SettingsItemProps {
export interface SettingsItemProps {
title: string;
renderTitleComponent?: (highlightedTitle: React.ReactNode | null) => React.ReactNode;
align?: 'top' | 'center';
Expand Down Expand Up @@ -188,7 +188,7 @@
section.header
))}

{section.items.map(({hidden, title, element}) =>

Check warning on line 191 in src/components/Settings/Settings.tsx

View workflow job for this annotation

GitHub Actions / Verify Files

'title' is already declared in the upper scope
hidden ? null : (
<div key={title} className={b('section-item')}>
{React.cloneElement(element, {
Expand Down
Loading