Skip to content

Commit

Permalink
chore: nits
Browse files Browse the repository at this point in the history
  • Loading branch information
macci001 committed Jan 27, 2025
1 parent 336d7e3 commit 54beb0a
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 15 deletions.
2 changes: 1 addition & 1 deletion apps/docs/content/components/disclosure/controlled.raw.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {Disclosure, Button} from "@heroui/react";
export default function App() {
const defaultContent =
"Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.";
const [isExpanded, onExpandedChange] = React.useState < boolean > false;
const [isExpanded, onExpandedChange] = React.useState(false);

return (
<div className="w-full flex flex-col">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {ItemProps, BaseItem} from "@heroui/aria-utils";
import {FocusableProps, PressEvents} from "@react-types/shared";
import {ReactNode, MouseEventHandler} from "react";
import {HTMLMotionProps} from "framer-motion";
import {DisclosureSlots, SlotsToClasses} from "@heroui/theme";

export type AccordionItemIndicatorProps = {
/**
Expand All @@ -28,10 +29,6 @@ export interface Props<T extends object = {}>
* The content of the component.
*/
children?: ReactNode;
/**
* The accordion item title.
*/
title?: ReactNode;
/**
* The accordion item subtitle.
*/
Expand Down Expand Up @@ -66,6 +63,7 @@ export interface Props<T extends object = {}>
* This will help all users to better find the content they are looking for.
*/
HeadingComponent?: As;
classNames?: SlotsToClasses<DisclosureSlots>;
}

export type AccordionItemBaseProps<T extends object = {}> = Props<T>;
Expand Down
4 changes: 1 addition & 3 deletions packages/components/accordion/src/use-accordion-item.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import type {DisclosureSlots, DisclosureVariantProps} from "@heroui/theme";
import type {DisclosureVariantProps} from "@heroui/theme";

import {HTMLHeroUIProps, PropGetter} from "@heroui/system";
import {ReactRef} from "@heroui/react-utils";
import {DisclosureProps} from "@heroui/disclosure";
import {SlotsToClasses} from "@heroui/theme";
import {Key, useCallback} from "react";
import {callAllHandlers} from "@heroui/shared-utils";

Expand All @@ -17,7 +16,6 @@ export interface Props extends HTMLHeroUIProps<"div"> {
ref?: ReactRef<HTMLButtonElement | null>;
id: string;
disabledKeys?: Iterable<Key>;
classNames?: SlotsToClasses<DisclosureSlots>;
onFocusChange?: (isFocused: boolean, key?: React.Key) => void;
}

Expand Down
7 changes: 1 addition & 6 deletions packages/components/accordion/stories/accordion.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -355,12 +355,7 @@ const CustomWithClassNamesTemplate = (args: AccordionProps) => {
id="4"
startContent={<InvalidCardIcon className="text-danger" />}
subtitle="Please, update now"
title={
<p className="flex gap-1 items-center">
Card expired
<span className="text-default-400 text-sm">*4812</span>
</p>
}
title={"Card expired"}
>
{defaultContent}
</AccordionItem>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ const CustomInidicatorTemplate = () => (
);

const ControlledTemplate = () => {
const [isExpanded, onExpandedChange] = React.useState<boolean>(false);
const [isExpanded, onExpandedChange] = React.useState(false);

return (
<div className="flex flex-col gap-4">
Expand Down

0 comments on commit 54beb0a

Please sign in to comment.