-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
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
Plugin content type builder dev #243
Plugin content type builder dev #243
Conversation
<div className={styles.buttonContainer}> | ||
<FormattedMessage id="form.button.save"> | ||
{(message) => ( | ||
<Button type="submit" label={message} buttonSize={"buttonLg"} buttonBackground={"primary"} onClick={this.props.handleSubmit} loader /> |
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.
Wouldn't it better to pass the message id (form.button.save
) directly as label in the label
prop Button
component?
}) | ||
); | ||
|
||
return ( | ||
<div className={`${pluginId} ${styles.app}`}> | ||
{React.Children.toArray(content)} | ||
{React.Children.toArray(content, 'fuck')} |
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.
I suppose that this part should be removed.
@@ -13,7 +13,9 @@ module.exports = { | |||
|
|||
getModel: async ctx => { | |||
const Service = strapi.plugins['content-type-builder'].services.contenttypebuilder; |
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.
Service
is already defined.
return ( | ||
<div className={styles.buttonContainer}> | ||
<FormattedMessage id="form.button.cancel"> | ||
{(message) => ( |
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.
Wouldn't it better to pass the message id directly as label in the label prop?
)} | ||
</FormattedMessage> | ||
<FormattedMessage id="form.button.save"> | ||
{(message) => ( |
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.
Wouldn't it better to pass the message id directly as label in the label prop?
LGTM. |
No description provided.