@foris/avocado-suite 0.0.1 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/{components → avocado-suite/src/components}/button/Button.d.ts +6 -4
- package/dist/avocado-suite/src/components/button/Button.test.d.ts +0 -0
- package/dist/avocado-suite/src/constants/theme.constants.d.ts +3 -0
- package/dist/avocado-suite/src/contexts/theme/ThemeProvider.d.ts +13 -0
- package/dist/avocado-suite/src/hooks/useTheme.d.ts +3 -0
- package/dist/avocado-suite/src/index.d.ts +3 -0
- package/dist/avocado-suite/src/types/theme.types.d.ts +4 -0
- package/dist/avocado-suite.es.js +610 -335
- package/dist/avocado-suite.umd.js +214 -11
- package/dist/index.d.ts +1 -2
- package/dist/style.css +1 -1
- package/package.json +18 -7
@@ -1,13 +1,15 @@
|
|
1
1
|
import React, { FC } from 'react';
|
2
|
-
|
3
|
-
export type ButtonVariant = '
|
2
|
+
import { IconTypes } from '../../../../avocado-icons/src/types/icons.type.ts';
|
3
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
4
4
|
export interface ButtonProps extends React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement> {
|
5
5
|
/** Render content button */
|
6
6
|
children: React.ReactNode | string;
|
7
7
|
/** Overwrite className */
|
8
8
|
className?: string;
|
9
|
-
/**
|
10
|
-
|
9
|
+
/** Show icon on the left */
|
10
|
+
leftIcon?: IconTypes;
|
11
|
+
/** Show icon on the right */
|
12
|
+
rightIcon?: IconTypes;
|
11
13
|
/** Use the variant prop to change the visual style of the Button */
|
12
14
|
variant?: ButtonVariant;
|
13
15
|
}
|
File without changes
|
@@ -0,0 +1,13 @@
|
|
1
|
+
import React, { ReactNode } from 'react';
|
2
|
+
import { AVOCADO_LIGHT_THEME, AVOCADO_DARK_THEME } from '../../constants/theme.constants';
|
3
|
+
import { Theme } from '../../types/theme.types';
|
4
|
+
type ThemeContextType = {
|
5
|
+
theme: Theme;
|
6
|
+
};
|
7
|
+
declare const ThemeContext: React.Context<ThemeContextType | undefined>;
|
8
|
+
type ThemeProviderProps = {
|
9
|
+
children: ReactNode;
|
10
|
+
theme?: Theme;
|
11
|
+
};
|
12
|
+
declare const ThemeProvider: React.FC<ThemeProviderProps>;
|
13
|
+
export { ThemeContext, ThemeProvider, AVOCADO_LIGHT_THEME, AVOCADO_DARK_THEME };
|