-
Notifications
You must be signed in to change notification settings - Fork 620
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new icon picker component #4335
- Loading branch information
Showing
122 changed files
with
3,621 additions
and
3,284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 14 additions & 12 deletions
26
packages/app-admin/src/base/providers/TelemetryProvider.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,27 @@ | ||
import React, { useEffect } from "react"; | ||
import { sendEvent } from "@webiny/telemetry/react"; | ||
import { ComponentWithChildren } from "~/types"; | ||
import { createProvider } from "@webiny/app"; | ||
|
||
let eventSent = false; | ||
|
||
interface TelemetryProviderProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export const createTelemetryProvider = () => (Component: ComponentWithChildren) => { | ||
return function TelemetryProvider({ children }: TelemetryProviderProps) { | ||
useEffect(() => { | ||
if (eventSent) { | ||
return; | ||
} | ||
export const createTelemetryProvider = () => { | ||
return createProvider(Component => { | ||
return function TelemetryProvider({ children }: TelemetryProviderProps) { | ||
useEffect(() => { | ||
if (eventSent) { | ||
return; | ||
} | ||
|
||
eventSent = true; | ||
eventSent = true; | ||
|
||
sendEvent("admin-app-start"); | ||
}, []); | ||
sendEvent("admin-app-start"); | ||
}, []); | ||
|
||
return <Component>{children}</Component>; | ||
}; | ||
return <Component>{children}</Component>; | ||
}; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
import React from "react"; | ||
import { UiProvider } from "@webiny/app/contexts/Ui"; | ||
import { ComponentWithChildren } from "~/types"; | ||
import { createProvider } from "@webiny/app"; | ||
|
||
interface UiStateProviderProps { | ||
children: React.ReactNode; | ||
} | ||
|
||
export const createUiStateProvider = () => (Component: ComponentWithChildren) => { | ||
return function UiStateProvider({ children }: UiStateProviderProps) { | ||
return ( | ||
<UiProvider> | ||
<Component>{children}</Component> | ||
</UiProvider> | ||
); | ||
}; | ||
export const createUiStateProvider = () => { | ||
return createProvider(Component => { | ||
return function UiStateProvider({ children }: UiStateProviderProps) { | ||
return ( | ||
<UiProvider> | ||
<Component>{children}</Component> | ||
</UiProvider> | ||
); | ||
}; | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.