@groupeactual/ui-kit 0.4.7 → 0.4.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -7,20 +7,23 @@ import { TextFieldProps } from '@mui/material/TextField';
7
7
  import { SxProps, Theme as Theme$1 } from '@mui/system';
8
8
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
9
9
 
10
- interface Props$6 extends Omit<TypographyProps, 'variant'> {
10
+ interface Props$7 extends Omit<TypographyProps, 'variant'> {
11
11
  variant?: 'big_number' | 'body1_regular' | 'body1_medium' | 'body1_bold' | 'body2_regular' | 'body2_medium' | 'body2_bold' | 'caption' | 'button_notif' | 'h1' | 'h2' | 'h3' | 'h4';
12
12
  component?: any;
13
13
  }
14
- declare const Text: (props: Props$6) => JSX.Element;
14
+ declare const Text: (props: Props$7) => JSX.Element;
15
15
 
16
- interface Props$5 extends Omit<LinkProps, 'variant'> {
16
+ interface Props$6 extends Omit<LinkProps, 'variant'> {
17
17
  variant?: 'link1' | 'link2';
18
18
  component?: any;
19
19
  }
20
- declare const Link: (props: Props$5) => JSX.Element;
20
+ declare const Link: (props: Props$6) => JSX.Element;
21
21
 
22
- type ActButtonType = (props: ButtonProps) => JSX.Element | null;
23
- declare const ActButton: ActButtonType;
22
+ interface Props$5 extends Omit<ButtonProps, 'variant'> {
23
+ variant?: 'primary' | 'secondary';
24
+ component?: any;
25
+ }
26
+ declare const Button: (props: Props$5) => JSX.Element;
24
27
 
25
28
  interface Props$4 {
26
29
  error?: string;
@@ -75,4 +78,4 @@ interface Props {
75
78
  }
76
79
  declare const DesignSystemProvider: ({ children, name: themeName }: PropsWithChildren<Props>) => JSX.Element;
77
80
 
78
- export { ActAccordion as Accordion, ActButton as Button, Checkbox, DesignSystemContext, DesignSystemContextValues, DesignSystemProvider, IconProvider, Link, Text, TextField };
81
+ export { ActAccordion as Accordion, Button, Checkbox, DesignSystemContext, DesignSystemContextValues, DesignSystemProvider, IconProvider, Link, Text, TextField };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@groupeactual/ui-kit",
3
- "version": "0.4.7",
3
+ "version": "0.4.9",
4
4
  "description": "A simple template for a custom React component library",
5
5
  "devDependencies": {
6
6
  "@babel/core": "^7.20.5",
@@ -1,17 +1,13 @@
1
- import Button, { ButtonProps } from '@mui/material/Button';
2
- import { styled } from '@mui/material/styles';
1
+ import { ButtonProps } from '@mui/material/Button';
2
+ import { Button as ButtonMUI } from '@mui/material';
3
3
 
4
- type ActButtonType = (props: ButtonProps) => JSX.Element | null;
4
+ interface Props extends Omit<ButtonProps, 'variant'> {
5
+ variant?: 'primary' | 'secondary';
6
+ component?: any;
7
+ }
5
8
 
6
- const ActButton: ActButtonType = styled(Button)<ButtonProps>(({ theme }) => ({
7
- color: theme.palette.blueClickable,
8
- border: `1px solid ${theme.palette.greyLightDefaultborder}`,
9
- borderRadius: 4,
10
- padding: '7.5px 16px',
11
- fontWeight: theme.typography.fontWeightBold,
12
- lineHeight: '18px',
13
- textTransform: 'unset',
14
- fontSize: '14px'
15
- }));
9
+ const Button = (props: Props) => {
10
+ return <ButtonMUI {...(props as ButtonProps)} />;
11
+ };
16
12
 
17
- export default ActButton;
13
+ export default Button;