Skip to content

Commit

Permalink
Merge pull request #29 from ruralinnovation/development
Browse files Browse the repository at this point in the history
fix types
  • Loading branch information
tech-team-rural-mda authored Aug 7, 2024
2 parents 2da2346 + beb8a7b commit 5e2504c
Show file tree
Hide file tree
Showing 26 changed files with 48 additions and 813 deletions.
2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/CategoricalLegend.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 26 additions & 1 deletion inst/dist/@cori-risi/components/HoverInfo.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,33 @@ export interface HoverObject {
y: number;
[key: number | string]: any;
}
/**
* This is a prototype generalization of the HoverInfo component used in the
* [Who Wins B2S app](https://github.com/ruralinnovation/who-wins-b2s/tree/main/src/components){target=_blank}
*
* ```ts
* import { HoverInfo } from '@cori-risi/cori.data.api';
*
* import "@cori-risi/cori.data.api/inst/dist/cori.data.api.css";
*
* // ...
*
* const [ hoverInfo, setHoverInfo ] = useState<HoverObject | null>(null);
*
* // ...
*
* <HoverInfo hoverInfo={hoverInfo}>
* <h3>{ hoverInfo.name }</h3>
* <p className={style['details']}>...</p>
* </HoverInfo>
* ```
*
* @param props.hoverInfo - an object that should, at minimum, contain x and y values (screen coordinates in pixels); "name" is also a userful prop
* @param props.xOffset - the HoverInfo box will be rendered at this offset from the event's x coordinate
* @param props.yOffset - the HoverInfo box will be rendered at this offset from the event's y coordinate
*/
export default function HoverInfo(props: {
children?: ReactElement[];
children?: ReactElement<any, any> | ReactElement<any, any>[];
hoverInfo: HoverObject;
xOffset?: number;
yOffset?: number;
Expand Down
2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/HoverInfo.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/HoverInfo.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions inst/dist/@cori-risi/components/basic.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import React, { ChangeEventHandler, ReactElement } from "react";
* ```
*/
export declare function Button(props: {
children?: ReactElement;
children?: ReactElement<any, any> | ReactElement<any, any>[];
onClick: () => void;
}): React.JSX.Element;
/**
Expand All @@ -22,7 +22,7 @@ export declare function Button(props: {
* ```
*/
export declare function Input(props: {
children?: ReactElement;
children?: ReactElement<any, any> | ReactElement<any, any>[];
type: string;
checked?: boolean;
min?: number;
Expand All @@ -34,6 +34,6 @@ export declare function Input(props: {
* This comment _supports_ [Markdown](https://www.markdownguide.org/)
*/
export declare function Label(props: {
children?: ReactElement;
children?: ReactElement<any, any> | ReactElement<any, any>[];
}): React.JSX.Element;
//# sourceMappingURL=basic.d.ts.map
2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/basic.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/components/basic.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/contexts/AmplifyContextProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export declare const AmplifyContext: React.Context<AmplifyContextType | null>;
* @param props.userPoolClientId - ACognito User pool App client ID (App clients are the user pool authentication resources attached to your app).
*/
export default function AmplifyContextProvider(props: {
children?: ReactElement[];
children?: ReactElement<any, any> | ReactElement<any, any>[];
domain?: string;
region?: string;
identityPoolId?: string;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion inst/dist/@cori-risi/contexts/ApiContextProvider.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export declare const ApiContext: React.Context<ApiContextType | null>;
* @param props.signOut - An optional function that is one of many destructured props contained in the Amplify authenticator context (returned by the useAuthenticator() hoook), used to sign out the current user.
*/
export default function ApiContextProvider(props: {
children?: ReactElement[];
children?: ReactElement<any, any> | ReactElement<any, any>[];
baseURL?: string;
fetchAuthSession?: Function;
getCurrentUser?: Function;
Expand Down
Loading

0 comments on commit 5e2504c

Please sign in to comment.