synerise-design
synerise-design copied to clipboard
Layout Page appMenu prop type problem
Hi,
I have encountered problem with Page component appMenu prop type.
Definition is: https://github.com/Synerise/synerise-design/blob/92df028df2a2a2b60f10642dc0228308cd4cdff7/packages/components/layout/src/Page/Page.tsx#L4-L8
but even when using Page component same as in examples from storybook https://github.com/Synerise/synerise-design/blob/92df028df2a2a2b60f10642dc0228308cd4cdff7/packages/portal/stories/components/Layout/BothSidebarsWithoutHeader.stories.tsx#L18
typescript is throwing types error:
TS2740: Type 'Element' is missing the following properties from type 'Component<{}, {}, any>': context, setState, forceUpdate, render, and 2 more.
Page.d.ts(4, 5): The expected type comes from property 'appMenu' which is declared here on type 'IntrinsicAttributes & LayoutProps & { children?: ReactNode; }'
There is no problem with navBar prop. When overwriting type definition for appMenu to be same as navBar which is React.ReactNode (instead of React.Component) components renders properly.
Problem occurs when using React in version 17 as well as in version 16.
I can make PR to change appMenu type to React.ReactNode, unless I'm missing something and this is not a problem with prop definition?
@ofsajd ☝️
Same here
Hi guys. We are considering whether to fork the lib to make a few adjustments or the make pull requests. Was wondering what are the plans, and whether you guys would accept simple/bug fixes pull requests. We want to use it in production, but there are some things that we would have to fix in order to make this our primary lib. Thanks!
@lowercase00 https://github.com/Synerise/synerise-design/issues/6 :)
@rootsher yep, saw that. How are you guys approaching the issue? Did you fork the platform?
@lowercase00 We used Chakra UI (https://chakra-ui.com). We are very satisfied. Adding even more complex components (which are in Synerise Design) was not difficult and development is now a pleasure.
@rootsher we like Chakra a lot, but we are a two-men team and Chakra demanded a whole bunch of customization. We currently have been using Ant, but really liked the features and UI of Synerise. Tough decision since this is not very active.
hi guys, on a couple days we will sent you some information about when we exactly migrate our repository. Then we will open Design System for your cooperation. Next step is updating react and react-dom into v17 ;)
@kbalus awesome, thanks a lot! please let us know, we are close to adopting Synerise in our project, and would be more than happy to contribute. If possible, would be great if you guys could include some guidance on how to contribute as well.
hey @kbalus ! Any updates on the updated repo? also, was wondering if you guys have any plans to update ant's version. 4.7.0 was released late 2020 and there are some compatibility issues. We also use some raw Ant components, so we would be happy to help to update ant's version as well. let me know. Cheers
hi guys, on a couple days we will sent you some information about when we exactly migrate our repository. Then we will open Design System for your cooperation. Next step is updating react and react-dom into v17 ;)
@kbalus react 18 is out :)
I also wonder how to go about this - forking or trying to push patches upstream? What would you prefer @ofsajd ?