Skip to content

Commit

Permalink
refactor(accordion): ♻️ update keys and imports
Browse files Browse the repository at this point in the history
  • Loading branch information
navin-moorthy committed Sep 16, 2020
1 parent 3117edd commit 3bf0079
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion src/accordion/AccordionState.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import {
unstable_IdStateReturn,
unstable_useIdState,
} from "reakit";
import { getNextItem } from "@chakra-ui/utils";

export type AccordionInitialState = unstable_IdInitialState & {
/**
Expand Down
2 changes: 1 addition & 1 deletion src/accordion/AccordionTrigger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import {

import { ACCORDION_TRIGGER_KEYS } from "./__keys";
import { AccordionStateReturn } from "./AccordionState";
import { useAccordionItemContext } from ".";
import { useAccordionItemContext } from "./AccordionItem";

export type AccordionTriggerOptions = unstable_IdOptions &
ButtonOptions &
Expand Down
4 changes: 2 additions & 2 deletions src/accordion/__keys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,6 @@ const ACCORDION_STATE_KEYS = [
"first",
"last",
] as const;
export const ACCORDION_ITEM_KEYS = [...ACCORDION_STATE_KEYS, "isOpen"];
export const ACCORDION_PANEL_KEYS = ACCORDION_ITEM_KEYS;
export const ACCORDION_ITEM_KEYS = [...ACCORDION_STATE_KEYS, "isOpen"] as const;
export const ACCORDION_PANEL_KEYS = ACCORDION_STATE_KEYS;
export const ACCORDION_TRIGGER_KEYS = ACCORDION_PANEL_KEYS;

0 comments on commit 3bf0079

Please sign in to comment.