Skip to content

Commit daa0995

Browse files
author
onesine
committed
Update Accordion body
1 parent 81f8219 commit daa0995

File tree

13 files changed

+477
-5
lines changed

13 files changed

+477
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ coverage
88

99
# builds
1010
build
11-
dist
11+
#dist
1212
.rpt2_cache
1313

1414
# misc

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -244,9 +244,10 @@ To animate the opening/closing of the accordion, use the Props transition availa
244244
245245
### AccordionBody
246246
247-
| Props | Type | Default | Description |
248-
|-------|----------|----------|-----------------------------------------------------------|
249-
| `as` | `String` | `button` | The HTML tag that will be used to render `AccordionBody`. |
247+
| Props | Type | Default | Description |
248+
|-------------|----------|----------|-----------------------------------------------------------|
249+
| `as` | `String` | `button` | The HTML tag that will be used to render `AccordionBody`. |
250+
| `className` | `String` | `button` | CSS classes to style the component. `AccordionBody`. |
250251
251252
## Contributing
252253
Got ideas on how to make this better? Open an issue!

dist/components/Accordion.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from "react";
2+
import { Items, Transition } from "../types";
3+
interface AccordionStore {
4+
accordionRef: React.MutableRefObject<null> | null;
5+
items: Items;
6+
setItems: (value: Items) => void;
7+
transition?: Transition | null;
8+
alwaysOpen?: boolean;
9+
}
10+
export declare const AccordionContext: React.Context<AccordionStore>;
11+
interface Props {
12+
children: JSX.Element | JSX.Element[];
13+
as?: string;
14+
transition?: Transition;
15+
alwaysOpen?: boolean;
16+
className?: string;
17+
}
18+
export declare const Accordion: React.FC<Props>;
19+
export default Accordion;

dist/components/AccordionBody.d.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
import React from "react";
2+
interface Props {
3+
children: JSX.Element | JSX.Element[];
4+
as?: string;
5+
className?: string;
6+
}
7+
declare const AccordionBody: React.FC<Props>;
8+
export default AccordionBody;

dist/components/AccordionHeader.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import React from "react";
2+
interface Props {
3+
children: JSX.Element | JSX.Element[];
4+
as?: string;
5+
className?: string;
6+
href?: string;
7+
onClick?: (e: Event) => void;
8+
}
9+
declare const AccordionHeader: React.FC<Props>;
10+
export default AccordionHeader;

dist/components/AccordionItem.d.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from "react";
2+
import { Items, Transition } from "../types";
3+
interface AccordionItemStore {
4+
accordionRef: React.MutableRefObject<null> | null;
5+
active: boolean;
6+
items: Items;
7+
hash: string;
8+
toggle: () => void;
9+
transition?: Transition | null;
10+
alwaysOpen?: boolean;
11+
isActive?: boolean;
12+
}
13+
export declare const AccordionItemContext: React.Context<AccordionItemStore>;
14+
export interface Props {
15+
children: JSX.Element | JSX.Element[] | Function;
16+
isActive?: boolean;
17+
}
18+
declare const AccordionItem: React.FC<Props>;
19+
export default AccordionItem;

dist/index.cjs.js

Lines changed: 205 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.cjs.js.map

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import Accordion from "./components/Accordion";
2+
import AccordionItem from "./components/AccordionItem";
3+
import AccordionHeader from "./components/AccordionHeader";
4+
import AccordionBody from "./components/AccordionBody";
5+
export { Accordion, AccordionItem, AccordionHeader, AccordionBody };

0 commit comments

Comments
 (0)