Skip to content

Commit

Permalink
Merge pull request #191 from oaknational/fix/update-copy-on-content-g…
Browse files Browse the repository at this point in the history
…uidence-modal

Fix/update copy on content guidance modal
  • Loading branch information
BTitterington authored May 22, 2024
2 parents be019f9 + ee56547 commit a97bb9d
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/molecules/OakModalCenter/OakModalCenter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,10 @@ export const OakModalCenter = ({
$inset="all-spacing-0"
$zIndex="behind"
$background="blackSemiTransparent"
style={{ backdropFilter: `blur(3px)` }}
style={{
backdropFilter: `blur(3px)`,
WebkitBackdropFilter: `blur(3px)`,
}}
data-testid="backdrop"
{...backdropFlexProps}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ exports[`OakModalCenter matches snapshot 1`] = `
data-testid="backdrop"
style={
{
"WebkitBackdropFilter": "blur(3px)",
"backdropFilter": "blur(3px)",
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ export type OakPupilJourneyContentGuidanceProps = {
* The level of supervision required for the content
*/
supervisionLevel?: string | null;
/**
* The text to be displayed on the accept button
*/
acceptText?: string;
/**
* The text to be displayed on the decline button
*/
declineText?: string;
};

export const removedGuidanceDuplicates = (
Expand All @@ -59,13 +67,17 @@ export const removedGuidanceDuplicates = (
* - **onDecline** \- Callback function to be called when the pupil declines the content guidance
* - **contentGuidance** \- An array of objects containing the content guidance label, description and area
* - **supervisionLevel** \- The level of supervision required for the content
* - **acceptText** \- The text to be displayed on the accept button
* - **declineText** \- The text to be displayed on the decline button
*/
export const OakPupilJourneyContentGuidance = ({
isOpen,
onAccept,
onDecline,
contentGuidance,
supervisionLevel = null,
acceptText = "I understand, continue",
declineText = "Take me back to lessons",
}: OakPupilJourneyContentGuidanceProps) => {
return (
<OakModalCenter
Expand All @@ -84,15 +96,15 @@ export const OakPupilJourneyContentGuidance = ({
onClick={onAccept}
data-testid="acceptButton"
>
I understand, continue
{acceptText}
</OakPrimaryButton>
<OakPrimaryInvertedButton
$font="heading-7"
iconName="arrow-left"
onClick={onDecline}
data-testid="declineButton"
>
Take me home
{declineText}
</OakPrimaryInvertedButton>
</OakFlex>
}
Expand Down

0 comments on commit a97bb9d

Please sign in to comment.