Closed kennethnym closed 3 years ago
can you open a new issue for the problem you have with gatsby and renderAs? as for the changelog i think @couds is documenting all the changes in CHANGELOG.md
on the next
branch.
Me again (perhaps it's only me that's using this unstable branch!) - I have found that the changes in RC.3 have made gatsby fail to build:
ERROR #98124 WEBPACK
Generating JavaScript bundles failed
undefined
If you're trying to use a package make sure that 'undefined' is installed. If you're trying to use a local file make sure that the path is correct.
File: src/pages/index.tsx:1:94
Everything works fine with RC.2, but 3, 4 and 5 throw this.
Hi @davepwsmith
I made a mistake building RC.3, check the latest one (Should be RC.5) it should work correctly
Afraid not @couds - neither .3, .4 or .5 work, all with the same error.
Weird. I will check this afternoon what its broken on the build and deploy a RC.6.
If possible can you share a simple repo to reproduce the issue?
Thanks
@davepwsmith Fixed on RC.7 Thanks for reporting.
Just to confirm that this is all good at my end with a more complicated example than the one I gave you! Thanks.
Hi.
Some typescript type definition maybe different.
The problematic part is MenuListItemProps
used in <Menu.List.Item>
.
https://github.com/couds/react-bulma-components/blob/v4.0.0-RC.7/src/components/menu/index.d.ts#L10
An type mismatch error occurs even if I use it according to the usage of bulma documents.
<Menu>
<Menu.List>
<Menu.List.Item>
/* ↓ Type mismatch.. 'string[] | ReactElement<any, string | JSXElementConstructor<any>>[]' */
hogehoge
</Menu.List.Item>
</Menu.List>
</Menu>
My team is using RC.7.
Hi @bino98 I will take s look. Thanks!
For what it's worth, unless you are specifically trying to restrict what people put inside these elements, I think you will pretty much always want ReactNode? It is the type that the react typings use for children (e.g. in PropsWithChildren<>).
It is a very broad type though, so if you did want to restrict further than that I would understand!
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/2034c45/types/react/index.d.ts#L194
Thank you comments.
I forgot to write past comment, even if use a ReactNode in <Menu.List.Item>
, this problem occurs.
for examples..
<Menu>
<Menu.List>
<Menu.List.Item>
<HogeLabel>hogehoge</HogeLabel>
</Menu.List.Item>
</Menu.List>
</Menu>
sorry if I'm wrong
Hi @bino98 - sorry my comment was directed at @couds. You are correct that the types aren't right.
@couds I can PR for this - but I also noticed that the title attribute is already typed as ReactNode... this means that you can put just about anything as the title here, extending to basically a whole other website! Should this not just be "string"?
I am struggling to even get the "next" branch set up at the moment though, npm i is complaining about package hashes and babel won't run...
Hi @davepwsmith
I will take a look about the issue with the env.
About the title, I prefer to keep it as a ReactNode, there are scenarios where we could want a more complex title (and anchor or anything else)
@davepwsmith I pushed the fix to the Item
definition. Thanks.
I was not able to reproduce the issue installing the package.
btw I recommend to use npm ci
instead of npm i
when installing the dependencies (it will only use the lock file and its faster
congrats for v4 release! :tada:
Thank you 😄
This is an issue tracking this library's upgrade to v4.0.
New features:
<List />
componentis-clickable
helperis-max-desktop
andis-max-widescreen
for Containerdisplay
prop without viewport modifiers. (5f1b1eb48e53ac87ac95ddcd53c3e7922323db98)is-size-7
(2162f3fb4d38f31a4c52446860c12fa098fd3161)is-sr-only
modifier (e9fc3d2854298988b1b8136619688a3a86fcc960)table-container
component (#274)hoverable
prop forTable
component (#273)rounded
prop forForm.Select
component (aed577435c2f6070d49e1d53102964232beb4a21)Form.Select
(d2afa6dcc4f2b3de383db7ac2ba4cc1120934bd4)name
prop ofForm.Radio
is no longer required. (b365663a0bdd8ff3bb2ecf6fae4722cb09c4335e)Breadcrumb
item
prop and replace it withBreadcrumb.Item
loading
Button prop in favor of a unifiedstate
prop that already exists.~ Button can have multiple state at once - thestate
prop will be removed because it can only take one state at a time. (0da86324c10f9182c9904149e0d1422ea1b38bf6) Reverting this, does not make sense to have focus, hover and/or hover at the same timeForm.Input
. (aff9690ef622413c93a92aeafca21ad72f659523)rounded
prop forForm.Input
(corresponds tois-rounded
) (af1c3a2a063db32eb6b0f973ca666ce0d2910b4b).centered
prop forInputFile
Form.Textarea
default rows of 4. (2153d5b20f1a763c12621096d50ff88e8caf2357)has-fixed-size
support forForm.Textarea
(2153d5b20f1a763c12621096d50ff88e8caf2357)Form.Textarea
(2153d5b20f1a763c12621096d50ff88e8caf2357) Reverting this, does not make sense to have focus, hover and/or hover at the same timeForm.InputFile
is now a controlled componentHeading
will now pick the appropriate header element based on the supplied size. For example,size={4}
tellsHeading
to renderh4
under the hood. Default size will now be 3~ Won't do, the user will select the appropiate element with renderAsrenderAs
for various components for consistency's sake. Except Table because with any other component will not workHousekeeping:
bulma
topeerDependency
(#258)cc @couds
edit: marked breaking changes.