Skip to content

Commit

Permalink
fix: text variant (#15)
Browse files Browse the repository at this point in the history
* fix: priority variant

* feat: container prop in protal component
  • Loading branch information
ajbura authored Apr 22, 2023
1 parent d492da7 commit d228fe6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions src/components/portal/Portal.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import React, { ReactNode } from "react";
import { createPortal } from "react-dom";

export const Portal = ({ children }: { children: ReactNode | ReactNode[] }) => (
<>{createPortal(children, document.body)}</>
export type PortalProps = {
container?: Element | DocumentFragment;
children: ReactNode | ReactNode[];
};
export const Portal = ({ container, children }: PortalProps) => (
<>{createPortal(children, container ?? document.body)}</>
);
6 changes: 3 additions & 3 deletions src/components/text/Text.css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,13 @@ export const Text = recipe({
Initial: {
opacity: 1,
},
500: {
"500": {
opacity: config.opacity.P500,
},
400: {
"400": {
opacity: config.opacity.P400,
},
300: {
"300": {
opacity: config.opacity.P300,
},
},
Expand Down

0 comments on commit d228fe6

Please sign in to comment.