@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.
@@ -1,13 +1,15 @@
1
1
  import React, { FC } from 'react';
2
- export type ButtonColor = 'primary' | 'danger';
3
- export type ButtonVariant = 'solid' | 'outline' | 'ghost';
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
- /** Use the color scheme */
10
- color?: ButtonColor;
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
  }
@@ -0,0 +1,3 @@
1
+ import { Theme } from '../types/theme.types';
2
+ export declare const AVOCADO_LIGHT_THEME: Theme;
3
+ export declare const AVOCADO_DARK_THEME: Theme;
@@ -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 };
@@ -0,0 +1,3 @@
1
+ export declare const useTheme: () => {
2
+ theme: import("../types/theme.types").Theme;
3
+ };
@@ -0,0 +1,3 @@
1
+ import Button from './components/button/Button';
2
+ import { ThemeProvider } from './contexts/theme/ThemeProvider';
3
+ export { Button, ThemeProvider };
@@ -0,0 +1,4 @@
1
+ export type ThemeMode = 'light' | 'dark';
2
+ export type Theme = {
3
+ mode: ThemeMode;
4
+ };