Просмотр исходного кода

Moved margin to parent component

Steven Fukase 5 лет назад
Родитель
Сommit
df968c5a46

+ 1 - 1
src/client/js/components/Admin/SlackIntegration/BotTypeCard.jsx

@@ -34,7 +34,7 @@ const BotTypeCard = (props) => {
 
   return (
     <div
-      className={`card m-3 admin-bot-card rounded border-radius-sm shadow ${props.isActive ? 'border-primary' : ''}`}
+      className={`card admin-bot-card rounded border-radius-sm shadow ${props.isActive ? 'border-primary' : ''}`}
       onClick={() => props.handleBotTypeSelect(botDetails[props.botType].botType)}
       role="button"
       key={props.botType}

+ 11 - 9
src/client/js/components/Admin/SlackIntegration/SlackIntegration.jsx

@@ -28,7 +28,7 @@ const SlackIntegration = (props) => {
   const [isSetupSlackBot, setIsSetupSlackBot] = useState(false);
 
 
-  const fetchData = useCallback(async() => {
+  const fetchData = useCallback(async () => {
     try {
       const response = await appContainer.apiv3.get('slack-integration/');
       const { currentBotType, customBotWithoutProxySettings } = response.data.slackBotSettingParams;
@@ -73,7 +73,7 @@ const SlackIntegration = (props) => {
     setSelectedBotType(null);
   };
 
-  const changeCurrentBotSettingsHandler = async() => {
+  const changeCurrentBotSettingsHandler = async () => {
     try {
       const res = await appContainer.apiv3.put('slack-integration/custom-bot-without-proxy', {
         slackSigningSecret: '',
@@ -147,19 +147,21 @@ const SlackIntegration = (props) => {
           <div className="row flex-wrap-reverse justify-content-center">
             {botTypes.map((botType) => {
               return (
-                <BotTypeCard
-                  key={botType}
-                  botType={botType}
-                  isActive={currentBotType === botType}
-                  handleBotTypeSelect={handleBotTypeSelect}
-                />
+                <div className="m-3">
+                  <BotTypeCard
+                    key={botType}
+                    botType={botType}
+                    isActive={currentBotType === botType}
+                    handleBotTypeSelect={handleBotTypeSelect}
+                  />
+                </div>
               );
             })}
           </div>
         </div>
       </div>
 
-      {settingsComponent}
+      { settingsComponent}
     </>
   );
 };