Skip to content

Commit

Permalink
fix: cleanup code
Browse files Browse the repository at this point in the history
  • Loading branch information
riccardoperra committed Nov 12, 2023
1 parent 4815f0b commit d442e82
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 11 deletions.
2 changes: 1 addition & 1 deletion packages/kit/src/components/Button/ButtonIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import * as styles from "./Button.css";
import { JSX, splitProps } from "solid-js";
import { JSX } from "solid-js";

export function ButtonIcon(props: JSX.IntrinsicElements["span"]) {
return <span class={styles.buttonIcon} {...props} />;
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/components/CheckBox/CheckBox.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Checkbox as KCheckbox } from "@kobalte/core";
import { JSX, Ref, Show, splitProps } from "solid-js";
import * as styles from "./CheckBox.css";
import { BaseFieldProps, createBaseFieldProps } from "../Field/createBaseFieldProps";
import { BaseFieldProps } from "../Field/createBaseFieldProps";
import {
createFieldErrorMessageProps,
FieldWithErrorMessageSupport,
Expand Down
3 changes: 1 addition & 2 deletions packages/kit/src/components/Dropdown/Dropdown.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import { GetKobalteParams } from "../../utils/types";
import { As, DropdownMenu as KDropdownMenu } from "@kobalte/core";
import { DropdownMenu as KDropdownMenu } from "@kobalte/core";
import * as styles from "./Dropdown.css";
import { JSX, JSXElement, Show, splitProps } from "solid-js";
import { OverrideComponentProps } from "@kobalte/utils";

export function DropdownMenuContent(props: KDropdownMenu.DropdownMenuContentProps) {
return <KDropdownMenu.Content {...props} class={styles.content} />;
Expand Down
3 changes: 2 additions & 1 deletion packages/kit/src/components/Field/Field.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { recipe, RecipeVariants } from "@vanilla-extract/recipes";
import { componentStateStyles } from "@kobalte/vanilla-extract";
import { themeTokens } from "../../foundation/themes.css";
import { tokens } from "../../foundation/contract.css";
import { themeVars } from "../../foundation";

export const FieldSizes = {
xs: "xs",
Expand Down Expand Up @@ -41,7 +42,7 @@ export const baseFieldVariants = recipe({
},
{
":focus": {
borderColor: themeTokens.colors.blue8,
borderColor: themeVars.brand,
},
},
componentStateStyles({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { label } from "./FieldLabel.css";
import { PolymorphicProps } from "@kobalte/utils/dist/types/polymorphic";
import { mergeProps } from "solid-js";
import { mergeClasses } from "../../../utils/css";
import { PolymorphicProps } from "@kobalte/core";

export function createFieldLabelProps<T extends PolymorphicProps<"label">>(props: T) {
return mergeProps(props, {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { description } from "./FieldMessage.css";
import { PolymorphicProps } from "@kobalte/utils/dist/types/polymorphic";
import { mergeProps } from "solid-js";
import { mergeClasses } from "../../../utils/css";
import { PolymorphicProps } from "@kobalte/core";

export function createFieldMessageProps<T extends PolymorphicProps<"div">>(props: T) {
return mergeProps(props, {
Expand Down
1 change: 0 additions & 1 deletion packages/kit/src/components/Select/Select.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { componentStateStyles } from "@kobalte/vanilla-extract";
import { tokens } from "../../foundation/contract.css";
import { baseFieldTheme, baseFieldVars } from "../Field/Field.css";
import { responsiveStyle } from "../../foundation/responsive";
import { dropdownMenuThemeVars } from "../Dropdown/Dropdown.css";

export const [selectTheme, selectThemeVars] = createTheme({
contentBackground: tokens.dropdownBackground,
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/components/Tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ type TabsIndicatorProps = KTabs.TabsIndicatorProps;
export function TabsIndicator(props: TabsIndicatorProps) {
const [local, others] = splitProps(props, ["class"]);
return (
<KTabs.Indicator {...props} class={mergeClasses(styles.indicator, local.class)} />
<KTabs.Indicator {...others} class={mergeClasses(styles.indicator, local.class)} />
);
}
2 changes: 1 addition & 1 deletion packages/kit/src/components/TextArea/TextArea.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { TextField as KTextField } from "@kobalte/core";
import { JSX, Ref, Show, splitProps } from "solid-js";
import * as styles from "./TextArea.css";
import { baseFieldContainer, textArea } from "./TextArea.css";
import { baseFieldContainer } from "./TextArea.css";
import { mergeClasses } from "../../utils/css";
import { TextAreaLabel } from "./TextAreaLabel";
import { TextAreaMessage } from "./TextAreaMessage";
Expand Down
1 change: 0 additions & 1 deletion packages/kit/src/icons/CloseIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { JSX } from "solid-js";
import { SvgIcon, SvgIconProps } from "./SvgIcon";

export function CloseIcon(props: SvgIconProps) {
Expand Down

0 comments on commit d442e82

Please sign in to comment.