aboutsummaryrefslogtreecommitdiffstats
path: root/server/sonar-web/design-system/src/sonar-aligned/components
diff options
context:
space:
mode:
authorJeremy Davis <jeremy.davis@sonarsource.com>2024-05-22 12:12:50 +0200
committersonartech <sonartech@sonarsource.com>2024-05-27 20:02:41 +0000
commit42537a47960b55f568297ba2140a3b2919b017df (patch)
tree7a34aca867db39d079f6dd5f3c1d39281b3d6d63 /server/sonar-web/design-system/src/sonar-aligned/components
parent1953626fabdb68e2f271899a16ad30faf4c2a7c8 (diff)
downloadsonarqube-42537a47960b55f568297ba2140a3b2919b017df.tar.gz
sonarqube-42537a47960b55f568297ba2140a3b2919b017df.zip
SONAR-22218 Rename props to match the new API
Diffstat (limited to 'server/sonar-web/design-system/src/sonar-aligned/components')
-rw-r--r--server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx4
-rw-r--r--server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx4
-rw-r--r--server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx4
-rw-r--r--server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx4
-rw-r--r--server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx3
5 files changed, 9 insertions, 10 deletions
diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx
index a3355135482..8931442ebc9 100644
--- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx
+++ b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonPrimary.tsx
@@ -21,7 +21,7 @@ import { css } from '@emotion/react';
import styled from '@emotion/styled';
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
import { ThemedProps } from '../../../types';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
export const PrimaryStyle = (props: ThemedProps) => css`
--background: ${themeColor('button')(props)};
@@ -31,6 +31,6 @@ export const PrimaryStyle = (props: ThemedProps) => css`
--border: ${themeBorder('default', 'transparent')(props)};
`;
-export const ButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const ButtonPrimary = styled(Button)`
${PrimaryStyle}
`;
diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx
index 3ee6c5f2892..f513c5f803a 100644
--- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx
+++ b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ButtonSecondary.tsx
@@ -19,9 +19,9 @@
*/
import styled from '@emotion/styled';
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
-export const ButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const ButtonSecondary = styled(Button)`
--background: ${themeColor('buttonSecondary')};
--backgroundHover: ${themeColor('buttonSecondaryHover')};
--color: ${themeContrast('buttonSecondary')};
diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx
index b0770cdfce1..ca701d8944e 100644
--- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx
+++ b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonPrimary.tsx
@@ -19,9 +19,9 @@
*/
import styled from '@emotion/styled';
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
-export const DangerButtonPrimary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const DangerButtonPrimary = styled(Button)`
--background: ${themeColor('dangerButton')};
--backgroundHover: ${themeColor('dangerButtonHover')};
--color: ${themeContrast('dangerButton')};
diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx
index 8815ab12de9..81cfc90010b 100644
--- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx
+++ b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/DangerButtonSecondary.tsx
@@ -19,9 +19,9 @@
*/
import styled from '@emotion/styled';
import { OPACITY_20_PERCENT, themeBorder, themeColor, themeContrast } from '../../../helpers';
-import { Button, ButtonProps } from './Button';
+import { Button } from './Button';
-export const DangerButtonSecondary: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+export const DangerButtonSecondary = styled(Button)`
--background: ${themeColor('dangerButtonSecondary')};
--backgroundHover: ${themeColor('dangerButtonSecondaryHover')};
--color: ${themeContrast('dangerButtonSecondary')};
diff --git a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx
index 9239e4ab209..afc27b57f1c 100644
--- a/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx
+++ b/server/sonar-web/design-system/src/sonar-aligned/components/buttons/ThirdPartyButton.tsx
@@ -18,7 +18,6 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
import styled from '@emotion/styled';
-import React from 'react';
import { OPACITY_20_PERCENT } from '../../../helpers/constants';
import { themeBorder, themeColor, themeContrast } from '../../../helpers/theme';
import { Button, ButtonProps } from './Button';
@@ -43,7 +42,7 @@ export function ThirdPartyButton({
);
}
-const ThirdPartyButtonStyled: React.FC<React.PropsWithChildren<ButtonProps>> = styled(Button)`
+const ThirdPartyButtonStyled = styled(Button)`
--background: ${themeColor('thirdPartyButton')};
--backgroundHover: ${themeColor('thirdPartyButtonHover')};
--color: ${themeContrast('thirdPartyButton')};