Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 7 additions & 19 deletions libs/components/canvas_authentication.d.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
export function CanvasAuthentication(props: any): React.JSX.Element;
export namespace CanvasAuthentication {
namespace defaultProps {
const overrides: {};
const hideButton: boolean;
const autoSubmit: boolean;
const buttonClassName: string;
const buttonText: null;
}
namespace propTypes {
const overrides_1: PropTypes.Requireable<PropTypes.InferProps<{}>>;
export { overrides_1 as overrides };
const hideButton_1: PropTypes.Requireable<boolean>;
export { hideButton_1 as hideButton };
const autoSubmit_1: PropTypes.Requireable<boolean>;
export { autoSubmit_1 as autoSubmit };
export const settings: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
const overrides: PropTypes.Requireable<PropTypes.InferProps<{}>>;
const hideButton: PropTypes.Requireable<boolean>;
const autoSubmit: PropTypes.Requireable<boolean>;
const settings: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
canvas_oauth_url: PropTypes.Requireable<string>;
}>>>;
const buttonClassName_1: PropTypes.Requireable<string>;
export { buttonClassName_1 as buttonClassName };
const buttonText_1: PropTypes.Requireable<string>;
export { buttonText_1 as buttonText };
const buttonClassName: PropTypes.Requireable<string>;
const buttonText: PropTypes.Requireable<string>;
}
}
declare const _default: (props: any) => React.JSX.Element;
declare const _default: any;
export default _default;
import React from "react";
import PropTypes from "prop-types";
9 changes: 1 addition & 8 deletions libs/components/canvas_authentication.js

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

2 changes: 1 addition & 1 deletion libs/components/canvas_authentication.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 package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "atomic-canvas",
"version": "3.0.0",
"version": "3.0.1",
"description": "Client side canvas api for Atomic Jolt",
"engines": {
"node": ">=14.18.2"
Expand Down
18 changes: 5 additions & 13 deletions src/components/canvas_authentication.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import { withSettings } from '@atomicjolt/atomic-fuel/libs/components/settings';

export function CanvasAuthentication(props) {
const {
autoSubmit,
hideButton,
buttonText,
buttonClassName,
autoSubmit = false,
hideButton = false,
buttonText = null,
buttonClassName = "",
settings,
overrides,
overrides = {},
} = props;

const formRef = useRef(null);
Expand Down Expand Up @@ -63,14 +63,6 @@ export function CanvasAuthentication(props) {
);
}

CanvasAuthentication.defaultProps = {
overrides: {},
hideButton: false,
autoSubmit: false,
buttonClassName: "",
buttonText: null,
}

CanvasAuthentication.propTypes = {
overrides: PropTypes.shape({}),
hideButton: PropTypes.bool,
Expand Down