Skip to content
This repository was archived by the owner on Oct 23, 2024. It is now read-only.

Support preact #74

Merged
merged 3 commits into from
Jan 25, 2022
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
8 changes: 4 additions & 4 deletions src/components/buttons/Social/SocialButton.style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export const brandThemes = {
google: {
...themes.light,
name: 'Google',
icon: (GoogleGColor as any).render(),
icon: (GoogleGColor as any).render({}),
formats: {
...themes.light.formats,
primary: '#4285f4',
Expand All @@ -38,7 +38,7 @@ export const brandThemes = {
facebook: {
...themes.light,
name: 'Facebook',
icon: (Facebook as any).render(),
icon: (Facebook as any).render({}),
formats: {
...themes.light.formats,
primary: '#4267b2',
Expand All @@ -58,7 +58,7 @@ export const brandThemes = {
light: {
...themes.dark,
name: 'Apple',
icon: (Apple as any).render(),
icon: (Apple as any).render({}),
formats: {
...themes.dark.formats,
primary: '#000',
Expand All @@ -68,7 +68,7 @@ export const brandThemes = {
dark: {
...themes.light,
name: 'Apple',
icon: (Apple as any).render(),
icon: (Apple as any).render({}),
formats: {
...themes.dark.formats,
primary: '#FFF',
Expand Down
13 changes: 7 additions & 6 deletions src/utils/HOCs/withIris.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,8 @@ export function withIris<
const component = name?.replace('Component', '');
const dev = { path, debug };

const RefComponentWithIris = {
$$iris: { version, component, dev },
...forwardRef<DOMElement, Props>((props: any, ref) => {
const RefComponentWithIris = forwardRef<DOMElement, Props>(
(props: any, ref) => {
useEffect(() => {
if (debug || (props && props.debug)) {
if (ref) console.log({ Component, ref });
Expand All @@ -86,8 +85,10 @@ export function withIris<
forwardRef: ref,
...props,
});
}),
};
}
);

RefComponentWithIris['$$iris'] = { version, component, dev };

return RefComponentWithIris as unknown as IrisComponent<
DOMElement,
Expand All @@ -111,7 +112,7 @@ const soPretty = `
padding: 0.25rem 1.25rem 0.3rem 0.5rem;
color: white;
text-shadow:
-1px -1px 0 rgba(0,0,0,0.334),
-1px -1px 0 rgba(0,0,0,0.334),
1px -1px 0 rgba(0,0,0,0.334),
-1px 2px 5px rgba(0,0,0,0.334),
1px 2px 5px rgba(0,0,0,0.334);
Expand Down
2 changes: 1 addition & 1 deletion src/utils/hooks/usePortal_DEPRECATED/Anchor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export function Anchor({
}

function useChildZIndex(children) {
if (children.ref.current) {
if (children?.ref?.current) {
const style = getComputedStyle(children.ref.current);
const zIndex = parseInt(style.zIndex);

Expand Down