Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 5 additions & 1 deletion src/renderer/components/fields/RadioGroup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,13 @@ export interface RadioGroupProps {
}

export function RadioGroup(props: Readonly<RadioGroupProps>) {
const firstOptionId = props.options[0]
? `radio-${props.name}-${props.options[0].value.toLowerCase()}`
: props.name;

return (
<Stack align="center" className="text-sm" direction="horizontal" gap="condensed">
<FieldLabel label={props.label} name={props.name} />
<FieldLabel label={props.label} name={firstOptionId} />

{props.options.map((item) => {
const name = `radio-${props.name}-${item.value.toLowerCase()}`;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 7 additions & 3 deletions src/renderer/components/filters/AccountFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useNotifications } from '../../hooks/useNotifications';
import { useAccountsStore, useFiltersStore } from '../../stores';

import { Checkbox } from '../fields/Checkbox';
import { Title } from '../primitives/Title';
import { SectionHeading } from '../primitives/SectionHeading';

import { getAccountUUID } from '../../utils/auth/utils';

Expand All @@ -17,9 +17,13 @@ export function AccountFilter() {

return (
<fieldset id="filter-accounts">
<Title icon={PersonIcon} tooltip={<Text>Filter notifications by account.</Text>}>
<SectionHeading
as="legend"
icon={PersonIcon}
tooltip={<Text>Filter notifications by account.</Text>}
>
Account
</Title>
</SectionHeading>

<Stack direction="vertical" gap="condensed">
{accounts.map((account) => {
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/components/filters/FilterSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useNotifications } from '../../hooks/useNotifications';
import { type FiltersState, useFiltersStore, useSettingsStore } from '../../stores';

import { Checkbox } from '../fields/Checkbox';
import { Title } from '../primitives/Title';
import { SectionHeading } from '../primitives/SectionHeading';

import type { Filter } from '../../utils/notifications/filters';
import { RequiresDetailedNotificationWarning } from './RequiresDetailedNotificationsWarning';
Expand Down Expand Up @@ -50,7 +50,8 @@ function FilterSectionComponent<K extends keyof FiltersState>({

return (
<fieldset id={id}>
<Title
<SectionHeading
as="legend"
icon={icon}
tooltip={
tooltip && (
Expand All @@ -62,7 +63,7 @@ function FilterSectionComponent<K extends keyof FiltersState>({
}
>
{title}
</Title>
</SectionHeading>

<Stack direction={layout} gap={layout === 'horizontal' ? 'normal' : 'condensed'}>
{(Object.keys(filter.FILTER_TYPES) as FiltersState[K][number][])
Expand Down
7 changes: 4 additions & 3 deletions src/renderer/components/filters/SearchFilter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import { cn } from 'cn';

import { useFiltersStore, useSettingsStore } from '../../stores';

import { Title } from '../primitives/Title';
import { SectionHeading } from '../primitives/SectionHeading';

import { IconColor, type SearchToken, Size } from '../../types';

Expand Down Expand Up @@ -66,7 +66,8 @@ export function SearchFilter() {

return (
<fieldset>
<Title
<SectionHeading
as="legend"
icon={SearchIcon}
tooltip={
<Stack direction="vertical" gap="condensed">
Expand Down Expand Up @@ -109,7 +110,7 @@ export function SearchFilter() {
}
>
Search
</Title>
</SectionHeading>

<Stack direction="vertical" gap="condensed">
<TokenSearchInput
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading