deprecate / metal-clay-components

10 stars 14 forks source link

Export components for WebComponents and Fixes #139

Closed matuzalemsteles closed 6 years ago

matuzalemsteles commented 6 years ago

Hey guys,

This pr resolves #138 and fixes some components.

Changes

Fixes

WebComponents

I'm not sure about the tag names in WebComponents and I've temporarily added clay-badge, I thought I'd put clay:badge to have a JSP pattern, but an error is thrown, I can not tell if this is expected behavior.

Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': "clay:badge" is not a valid custom element name

It is worth mentioning that I felt some difficulties in the demos in passing through the parameters numbers that in the case was to be string, as an example the badge.

<clay-badge label="10"></clay-badge>

Result in:

Warning: Error: Warning: Invalid state passed to 'label'. Expected type 'string', but received type 'number'. Passed to 'ClayBadge'. 

In the case of clay-progress-bar where expected of minValue is a number.

<clay-progress-bar minValue="0" value="40"></clay-progress-bar>

But it is passed as string:

Warning: Error: Warning: Invalid state passed to 'minValue'. Expected type 'number', but received type 'string'. Passed to 'ClayProgressBar'. 
jbalsas commented 6 years ago

Hey @matuzalemsteles, great stuff!!

I'm not sure about the tag names in WebComponents and I've temporarily added clay-badge, I thought I'd put clay:badge to have a JSP pattern, but an error is thrown, I can not tell if this is expected behavior.

It is expected, the right name is indeed clay-badge πŸ‘

It is worth mentioning that I felt some difficulties in the demos in passing through the parameters numbers that in the case was to be string, as an example the badge.

Can you please open an issue in metal.js so we can consider it for the next sprint?

matuzalemsteles commented 6 years ago

Thanks @jbalsas.

Okay, I'll send it.

carloslancha commented 6 years ago

Just started reviewing :)

:octocat: Sent from GH.