Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor fixes for property names. #15

Merged
merged 5 commits into from
Mar 2, 2023
Merged
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
1 change: 1 addition & 0 deletions packages/module/patternfly-docs/content/examples/Basic.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import React from 'react';
import { FeedbackModal} from '@patternfly/react-user-feedback';
import { Button } from '@patternfly/react-core';


export const BasicExample: React.FunctionComponent = () => {
const [isOpen, setIsOpen] = React.useState<boolean>(false);
const handleButtonClicked = () => {setIsOpen(true)};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ const pageData = {
"description": "Feedback image that shows up in the modal"
},
{
"name": "feedbackLocal",
"type": "FeedbackLocale",
"name": "feedbackLocale",
"description": "Optional prop to change the default english strings to a string of the user choice."
},
{
Expand Down Expand Up @@ -75,7 +74,7 @@ pageData.relativeImports = {
};
pageData.examples = {
'Example': props =>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { FeedbackModal} from '@patternfly/react-user-feedback';\nimport { Button } from '@patternfly/react-core';\n\nexport const BasicExample: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const handleButtonClicked = () => {setIsOpen(true)}; \n return <>\n <Button onClick={handleButtonClicked}>Show Modal</Button>\n <FeedbackModal \n email= \"test@redhat.com\" \n onShareFeedback='https://console.redhat.com/self-managed-feedback-form' \n onJoinMailingList='https://console.redhat.com/self-managed-research-form'\n isOpen={isOpen}\n onClose={()=>setIsOpen(false)}/>\n </>\n}\n","title":"Example","lang":"js"}}>
<Example {...pageData} {...props} {...{"code":"import React from 'react';\nimport { FeedbackModal} from '@patternfly/react-user-feedback';\nimport { Button } from '@patternfly/react-core';\n\n\nexport const BasicExample: React.FunctionComponent = () => {\n const [isOpen, setIsOpen] = React.useState<boolean>(false);\n const handleButtonClicked = () => {setIsOpen(true)}; \n return <>\n <Button onClick={handleButtonClicked}>Show Modal</Button>\n <FeedbackModal \n email= \"test@redhat.com\" \n onShareFeedback='https://console.redhat.com/self-managed-feedback-form' \n onJoinMailingList='https://console.redhat.com/self-managed-research-form'\n isOpen={isOpen}\n onClose={()=>setIsOpen(false)}/>\n </>\n}\n","title":"Example","lang":"js"}}>

</Example>
};
Expand Down
4 changes: 2 additions & 2 deletions packages/module/src/Feedback/FeedbackModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export interface FeedbackModalProps {
/** Optional call back that will be called when the user closes user feedback modal. */
onClose: () => void;
/** Optional prop to change the default english strings to a string of the user choice. */
feedbackLocal?: FeedbackLocale;
feedbackLocale?: FeedbackLocale;
/** If a URL is given the join mailing list link will redirect to another site to join the mailing list. If a function is provided we will display a join mailing list screen with a submit button. If it's undefined then report a bug will be removed from share feedback modal*/
onJoinMailingList?: string | "()=>{}"
/** If a URL is given the report a bug link will redirect to another site to report the bug. If a function is provided we will display a feedback screen with a submit button. If it's undefined then join mailing list will be removed from the share feedback modal*/
Expand All @@ -28,7 +28,7 @@ export interface FeedbackModalProps {
* @param props
* @returns
*/
export const FeedbackModal = (props: FeedbackModalProps) => <LocaleContext.Provider value={props.feedbackLocal ? props.feedbackLocal : defaultFeedback}
export const FeedbackModal = (props: FeedbackModalProps) => <LocaleContext.Provider value={props.feedbackLocale ? props.feedbackLocale : defaultFeedback}
>
<FeedbackModalInternal {...props} />
</LocaleContext.Provider>
Expand Down