Skip to content

Commit

Permalink
Merge pull request #27 from ruralinnovation/development
Browse files Browse the repository at this point in the history
fix children props
  • Loading branch information
tech-team-rural-mda authored Aug 7, 2024
2 parents a8ad659 + a0ddabf commit 61395c7
Show file tree
Hide file tree
Showing 8 changed files with 13 additions and 9 deletions.
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.

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.

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion lib/@cori-risi/components/HoverInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export interface HoverObject {
* @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[], hoverInfo: HoverObject, xOffset?: number, yOffset?: number }) {
export default function HoverInfo (props: {
children?: ReactElement | ReactElement[],
hoverInfo: HoverObject,
xOffset?: number, yOffset?: number
}) {
const { hoverInfo, xOffset, yOffset } = props;

return (!!hoverInfo) ? (
Expand Down
4 changes: 2 additions & 2 deletions lib/@cori-risi/components/basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function Button(props: { children?: ReactElement, onClick: () => void })
* ```
*/
export function Input(props: {
children?: ReactElement,
children?: ReactElement | ReactElement[],
type: string,
checked?: boolean,
min?: number,
Expand All @@ -43,6 +43,6 @@ export function Input(props: {
/**
* This comment _supports_ [Markdown](https://www.markdownguide.org/)
*/
export function Label(props: { children?: ReactElement }) {
export function Label(props: { children?: ReactElement | ReactElement[] }) {
return <label {...props} />
}
2 changes: 1 addition & 1 deletion lib/@cori-risi/contexts/AmplifyContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const AmplifyContext = createContext<AmplifyContextType | null>(initAmpli
* @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 | ReactElement[],
domain?: string,
region?: string,
identityPoolId?: string,
Expand Down
2 changes: 1 addition & 1 deletion lib/@cori-risi/contexts/ApiContextProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ let hasAuthClient = false;
* @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 | ReactElement[],
baseURL?: string,
fetchAuthSession?: Function,
getCurrentUser?: Function,
Expand Down

0 comments on commit 61395c7

Please sign in to comment.