Skip to content

Commit

Permalink
feat(odyssey-react): add Box as root of Banner
Browse files Browse the repository at this point in the history
andrewberg-okta committed Dec 21, 2021

Verified

This commit was signed with the committer’s verified signature.
cyriltovena Cyril Tovena
1 parent 15a9693 commit 3321802
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions packages/odyssey-react/src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -14,6 +14,7 @@ import React, { forwardRef } from "react";
import type { ComponentPropsWithRef } from "react";
import { withTheme } from "@okta/odyssey-react-theme";
import { useCx, useOmit } from "../../utils";
import { Box } from "../Box";
import { Heading } from "../Heading";
import { Button } from "../Button";
import { Text } from "../Text";
@@ -22,7 +23,10 @@ import { CautionIcon, CloseIcon, ErrorIcon, GetInfoIcon } from "../Icon";
import styles from "./Banner.module.scss";

interface CommonProps
extends Omit<ComponentPropsWithRef<"div">, "style" | "className" | "role"> {
extends Omit<
ComponentPropsWithRef<"div">,
"style" | "className" | "role" | "color"
> {
/**
* The visual variant to be displayed to the user.
* @default info
@@ -91,7 +95,7 @@ export const Banner = withTheme(
const omitProps = useOmit(rest);

return (
<div
<Box
{...omitProps}
ref={ref}
className={componentClass}
@@ -129,7 +133,7 @@ export const Banner = withTheme(
/>
</span>
)}
</div>
</Box>
);
})
);

0 comments on commit 3321802

Please sign in to comment.