Changeset View
Changeset View
Standalone View
Standalone View
web/sidebar/community-drawer-item-handler.react.js
// @flow | // @flow | ||||
export type CommunityDrawerItemHandler = { | export type CommunityDrawerItemHandler = { | ||||
+onClick: (event: SyntheticEvent<HTMLElement>) => void, | +onClick: (event: SyntheticEvent<HTMLElement>) => void, | ||||
+isActive: boolean, | +isActive: boolean, | ||||
}; | }; | ||||
export type CommunityDrawerItemCommunityHandler = { | |||||
+onClick: (event: SyntheticEvent<HTMLElement>) => void, | |||||
+expanded: boolean, | |||||
+isActive: boolean, | |||||
}; | |||||
tomek: Do we have to introduce a new type? How about adding `expanded` to `CommunityDrawerItemHandler`? | |||||
inkaAuthorUnsubmitted Done Inline Actionsexpanded is added to CommunityDrawerItemHandler in D6975, but so is a new field - toggleExpanded. I prefer to have separate types for community items, which don't have this filed. It avoids the ambiguity of not knowing which items are supposed to have it defined and which are not. inka: `expanded` is added to `CommunityDrawerItemHandler` in D6975, but so is a new field… |
Do we have to introduce a new type? How about adding expanded to CommunityDrawerItemHandler?