Skip to content

Commit

Permalink
chore: rename ThemeSpec to FilterTheme
Browse files Browse the repository at this point in the history
  • Loading branch information
lawvs committed Aug 23, 2024
1 parent 99f0b40 commit 25746f6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
8 changes: 4 additions & 4 deletions packages/filter/src/theme/preset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
ButtonView,
InputView,
SingleSelectView,
MultiSelectView,
SingleSelectView,
} from "../views/components.js";
import { presetDataInputSpecs } from "../views/data-input-views.js";
import { FieldSelect } from "../views/field-select.js";
Expand All @@ -14,9 +14,9 @@ import { FilterSelect } from "../views/filter-select.js";
import { primitives } from "../views/primitives.js";
import { RuleJoiner } from "../views/rule-joiner.js";
import { SingleFilterContainer } from "../views/single-filter-container.js";
import type { ThemeSpec } from "./index.js";
import type { FilterTheme } from "./index.js";

export const presetTheme: ThemeSpec = {
export const presetTheme: FilterTheme = {
primitives,
components: {
Button: ButtonView,
Expand All @@ -35,4 +35,4 @@ export const presetTheme: ThemeSpec = {
SingleFilterContainer,
},
dataInputViews: presetDataInputSpecs,
} satisfies ThemeSpec;
};
9 changes: 7 additions & 2 deletions packages/filter/src/theme/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import type {
} from "react";
import type { z } from "zod";
import type {
SingleSelectProps,
MultiSelectProps,
SingleSelectProps,
} from "../views/components.js";
import type { FieldSelectProps } from "../views/field-select.js";
import type { DataInputProps } from "../views/filter-data-input.js";
Expand Down Expand Up @@ -39,7 +39,7 @@ export type DataInputViewSpec = {
view: ComponentType<DataInputViewProps>;
};

export type ThemeSpec = {
export type FilterTheme = {
primitives: {
button: ComponentType<
ButtonHTMLAttributes<HTMLButtonElement> & RefAttributes<HTMLButtonElement>
Expand Down Expand Up @@ -84,3 +84,8 @@ export type ThemeSpec = {
};
dataInputViews: DataInputViewSpec[];
};

/**
* @deprecated use {@link FilterTheme} instead
*/
export type ThemeSpec = FilterTheme;

0 comments on commit 25746f6

Please sign in to comment.