Skip to content

Commit 8260cc9

Browse files
committed
chore: some changes
1 parent 87d9d12 commit 8260cc9

File tree

8 files changed

+8
-11
lines changed

8 files changed

+8
-11
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { ContentProps } from '../../interfaces';
2-
declare const Event: ({ collapse, defaultClosed, description, title }: ContentProps) => JSX.Element;
2+
declare const Event: ({ defaultClosed, description, title }: ContentProps) => JSX.Element;
33
export { Event };

lib/cjs/components/event/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ var useConfig_1 = require("../../hooks/useConfig");
2929
var main_1 = require("../../styles/main");
3030
var Event = function (_a) {
3131
var _b;
32-
var collapse = _a.collapse, defaultClosed = _a.defaultClosed, description = _a.description, title = _a.title;
32+
var defaultClosed = _a.defaultClosed, description = _a.description, title = _a.title;
3333
var config = (0, useConfig_1.useConfig)().config;
3434
var _c = (0, react_1.useState)(!defaultClosed), show = _c[0], setShow = _c[1];
35-
var isCollapsed = collapse || config.collapse;
35+
var isCollapsed = config.collapse;
3636
var handleSetShow = function () {
3737
setShow(!show);
3838
};

lib/cjs/interfaces/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export interface EventsProps {
4646
withoutDay?: boolean;
4747
}
4848
export interface ContentProps {
49-
collapse?: boolean;
5049
defaultClosed?: boolean;
5150
description: string[];
5251
title: string;
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { ContentProps } from '../../interfaces';
2-
declare const Event: ({ collapse, defaultClosed, description, title }: ContentProps) => JSX.Element;
2+
declare const Event: ({ defaultClosed, description, title }: ContentProps) => JSX.Element;
33
export { Event };

lib/esm/components/event/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { useConfig } from '../../hooks/useConfig';
33
import { Description, DescriptionWrapper, EventTitle, Icon } from '../../styles/main';
44
var Event = function (_a) {
55
var _b;
6-
var collapse = _a.collapse, defaultClosed = _a.defaultClosed, description = _a.description, title = _a.title;
6+
var defaultClosed = _a.defaultClosed, description = _a.description, title = _a.title;
77
var config = useConfig().config;
88
var _c = useState(!defaultClosed), show = _c[0], setShow = _c[1];
9-
var isCollapsed = collapse || config.collapse;
9+
var isCollapsed = config.collapse;
1010
var handleSetShow = function () {
1111
setShow(!show);
1212
};

lib/esm/interfaces/index.d.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,6 @@ export interface EventsProps {
4646
withoutDay?: boolean;
4747
}
4848
export interface ContentProps {
49-
collapse?: boolean;
5049
defaultClosed?: boolean;
5150
description: string[];
5251
title: string;

src/components/event/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@ import { useConfig } from '../../hooks/useConfig';
33
import { ContentProps } from '../../interfaces';
44
import { Description, DescriptionWrapper, EventTitle, Icon } from '../../styles/main';
55

6-
const Event = ({ collapse, defaultClosed, description, title }: ContentProps) => {
6+
const Event = ({ defaultClosed, description, title }: ContentProps) => {
77
const { config } = useConfig();
88
const [show, setShow] = useState(!defaultClosed);
9-
const isCollapsed = collapse || config.collapse;
9+
const isCollapsed = config.collapse;
1010

1111
const handleSetShow = () => {
1212
setShow(!show);

src/interfaces/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ export interface EventsProps {
5353
}
5454

5555
export interface ContentProps {
56-
collapse?: boolean;
5756
defaultClosed?: boolean;
5857
description: string[];
5958
title: string;

0 commit comments

Comments
 (0)