You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/03/21 12:38:06 UTC

[GitHub] [apisix-dashboard] stu01509 commented on a change in pull request #1610: feat: improve the config plugin button enable disable status

stu01509 commented on a change in pull request #1610:
URL: https://github.com/apache/apisix-dashboard/pull/1610#discussion_r598272999



##########
File path: web/src/components/Plugin/PluginPage.tsx
##########
@@ -180,16 +180,21 @@ const PluginPage: React.FC<Props> = ({
                   key={item.name}
                   actions={[
                     <Button
-                      type={
+                      type='primary'
+                      danger= {
                         initialData[item.name] && !initialData[item.name].disable
-                          ? 'primary'
-                          : 'default'
+                          ? true
+                          : false
                       }
                       onClick={() => {
                         setName(item.name);
                       }}
                     >
-                      Enable
+                      {
+                        initialData[item.name] && !initialData[item.name].disable
+                          ? 'Disable'
+                          : 'Enable'
+                      }

Review comment:
       Hi @juzhiyuan 
   
   In here should I create the translation in locales file?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org