Skip to content

Instantly share code, notes, and snippets.

@gamename
Last active July 17, 2023 11:32
Show Gist options
  • Save gamename/33f275f20bfef2ae49089b47a1743465 to your computer and use it in GitHub Desktop.
Save gamename/33f275f20bfef2ae49089b47a1743465 to your computer and use it in GitHub Desktop.
Code that calls component "ProblemReport"
import {ProblemReport} from "@/src/ui-components";
import {API} from "aws-amplify";
import {useRouter} from "next/router";
import {useTheme} from "@aws-amplify/ui-react";
export default function ReportProblem() {
const router = useRouter();
const {tokens} = useTheme();
return (
<ProblemReport
overrides={
{
SectionalElement0: {
fontSize: tokens.fontSizes.xxxxl,
textAlign: 'center',
width: "65rem",
},
Field0: {
fontSize: tokens.fontSizes.xxxxl,
width: "45rem",
},
Field1: {
fontSize: tokens.fontSizes.xxxxl,
width: "45rem",
},
Field2: {
fontSize: tokens.fontSizes.xxxxl,
width: "45rem",
height: "15rem",
},
SubmitButton: {
fontSize: tokens.fontSizes.xxxxl,
},
CancelButton: {
fontSize: tokens.fontSizes.xxxxl,
}
}
}
onSubmit={
alert('Thank you for your report. We will look into it as soon as possible.')
}
onCancel={() => {
router.back()
}
}
/>
)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment