-
-
Notifications
You must be signed in to change notification settings - Fork 239
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add mantine theme #1287
base: master
Are you sure you want to change the base?
Add mantine theme #1287
Conversation
Was this abandoned? |
No, I will get back to it next week. We must wait for the bump |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
class _ extends parent { | ||
static Mantine = Mantine; | ||
|
||
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/restrict-template-expressions -- comes from uniform's core |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this eslint comment needed? I didn't see it previously in other themes.
parent.onChange(value); | ||
}} | ||
> | ||
<IconTrash size="1rem" color="white" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other themes, we have icon
props with default value. You did it like this in the ListAddField
.
required={tooltip ? false : required} | ||
error={showInlineError && !!error && errorMessage} | ||
> | ||
<ListMantine listStyleType="none" w="100%" {...filterDOMProps(props)}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You did List as ListMantine
, but in RadioField
you wrote Radio as MantineRadio
. Stick to one convention.
placeholder={placeholder} | ||
required={required ?? false} | ||
defaultValue={[]} | ||
value={value as string[]} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You shouldn't be forced to do that.
placeholder={placeholder} | ||
required={required ?? false} | ||
defaultValue={null} | ||
value={value as string} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as above
|
||
return ( | ||
<Button | ||
mb="xs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In other themes, we don't add margin to the SubmitField
); | ||
} | ||
|
||
Text.defaultProps = { type: 'text' }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
defaultProps
is deprecated. Set the default type value when destructuring props.
placeholder={placeholder} | ||
readOnly={readOnly} | ||
ref={inputRef} | ||
type={type ?? 'text'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove it. It should be by default text
if not defined.
ref={inputRef} | ||
type={type ?? 'text'} | ||
value={value ?? ''} | ||
w="100%" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we have full width by default in other themes? Material theme receives fullWidth
from theme props, for example.
@@ -0,0 +1,30 @@ | |||
import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in the multiple files you imported React
, but it isn't used
No description provided.