@primer/react-brand 0.0.2-rc.c68b685 → 0.0.3
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/lib/ExpandableArrow/ExpandableArrow.d.ts +8 -0
- package/lib/ExpandableArrow/index.d.ts +1 -0
- package/lib/Hero/Hero.d.ts +12 -4
- package/lib/Hero/index.d.ts +1 -1
- package/lib/LinkButton/LinkButton.d.ts +6 -0
- package/lib/LinkButton/index.d.ts +1 -0
- package/lib/ThemeProvider/ThemeProvider.d.ts +18 -0
- package/lib/ThemeProvider/index.d.ts +2 -0
- package/lib/ThemeProvider/useTheme.d.ts +1 -0
- package/lib/css/gh-variables.color.css +1025 -0
- package/lib/index.d.ts +2 -1
- package/lib/index.js +2 -2
- package/lib/index.js.LICENSE.txt +14 -0
- package/lib/main.css +142 -0
- package/package.json +64 -16
- package/CHANGELOG.md +0 -7
- package/lib/cjs/index.css +0 -2
- package/lib/cjs/index.css.map +0 -7
- package/lib/cjs/index.js +0 -2
- package/lib/cjs/index.js.map +0 -7
- package/lib/index.css +0 -2
- package/lib/index.css.map +0 -7
- package/lib/index.js.map +0 -7
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare type ExpandableArrowProps = {
|
|
3
|
+
className?: string;
|
|
4
|
+
/** Animate between a chevron arrow and an arrow with a stem by toggling the value of `expanded` */
|
|
5
|
+
expanded?: boolean;
|
|
6
|
+
};
|
|
7
|
+
export declare function ExpandableArrow({ className, expanded }: ExpandableArrowProps): JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './ExpandableArrow';
|
package/lib/Hero/Hero.d.ts
CHANGED
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
declare type
|
|
3
|
-
|
|
1
|
+
import React from 'react';
|
|
2
|
+
declare type Action = {
|
|
3
|
+
text: string;
|
|
4
|
+
href: string;
|
|
4
5
|
};
|
|
5
|
-
export declare
|
|
6
|
+
export declare type HeroProps = {
|
|
7
|
+
heading: string | React.ReactElement;
|
|
8
|
+
description?: string | React.ReactElement;
|
|
9
|
+
primaryAction: Action;
|
|
10
|
+
secondaryAction?: Action;
|
|
11
|
+
align?: 'start' | 'center';
|
|
12
|
+
};
|
|
13
|
+
export declare function Hero({ heading, description, primaryAction, secondaryAction, align }: HeroProps): JSX.Element;
|
|
6
14
|
export {};
|
package/lib/Hero/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export * from './Hero';
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare type LinkButtonProps = {
|
|
3
|
+
href: string;
|
|
4
|
+
variant?: 'primary' | 'secondary';
|
|
5
|
+
} & React.ComponentPropsWithoutRef<'a'>;
|
|
6
|
+
export declare function LinkButton({ variant, className, children, onMouseEnter, onMouseLeave, onFocus, onBlur, ...props }: LinkButtonProps): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './LinkButton';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React, { PropsWithChildren } from 'react';
|
|
2
|
+
export declare enum ColorModesEnum {
|
|
3
|
+
LIGHT = "light",
|
|
4
|
+
DARK = "dark",
|
|
5
|
+
AUTO = "auto"
|
|
6
|
+
}
|
|
7
|
+
export declare type ColorMode = `${ColorModesEnum}`;
|
|
8
|
+
export declare type ThemeContextProps = {
|
|
9
|
+
colorMode?: ColorMode;
|
|
10
|
+
};
|
|
11
|
+
export declare type ThemeProviderProps = {
|
|
12
|
+
colorMode?: ColorMode;
|
|
13
|
+
};
|
|
14
|
+
export declare const ThemeContext: React.Context<ThemeContextProps>;
|
|
15
|
+
/**
|
|
16
|
+
* ThemeProvider is used to provide theme-related context to its child components.
|
|
17
|
+
*/
|
|
18
|
+
export declare function ThemeProvider({ colorMode, children }: PropsWithChildren<ThemeProviderProps>): JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useTheme: () => import("./ThemeProvider").ThemeContextProps;
|