Skip to content

Commit

Permalink
adjust code style
Browse files Browse the repository at this point in the history
  • Loading branch information
hoppe committed Jan 3, 2023
1 parent 694141b commit f640f95
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
11 changes: 8 additions & 3 deletions packages/react/src/ui-react/environment/browser-environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export interface BrowserEnvironment
opts?: FormControlOptions
): JSX.Element;

getFormLayout<V extends FormValues>(layoutType?: FormLayoutType): React.FC<LayoutProps<V>>;
getFormLayout<V extends FormValues>(
layoutType?: FormLayoutType
): React.FC<LayoutProps<V>>;
}

export interface BrowserEnvironmentConfig extends EnvironmentConfig {
Expand All @@ -58,7 +60,8 @@ export class DefaultBrowserEnvironment
BrowserEnvironmentConfig,
BrowserDependencyFactories
>
implements BrowserEnvironment {
implements BrowserEnvironment
{
name = EnvironmentName.Browser;

async beforeInit(): Promise<void> {
Expand Down Expand Up @@ -90,7 +93,9 @@ export class DefaultBrowserEnvironment
/**
* Get the form control for a given parameter
*/
getFormLayout<V extends FormValues>(layoutType: FormLayoutType = "list"): React.FC<LayoutProps<V>> {
getFormLayout<V extends FormValues>(
layoutType: FormLayoutType = "list"
): React.FC<LayoutProps<V>> {
const provider = this.getInjectable<FormLayoutProvider>(
BrowserDependencyName.FormLayoutProvider
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import { initFluentIcons } from "./environment-util";
*/
export class MockBrowserEnvironment
extends MockEnvironment<BrowserEnvironmentConfig>
implements BrowserEnvironment {
implements BrowserEnvironment
{
isMockBrowserEnvironment: boolean = true;

async beforeInit(): Promise<void> {
Expand Down Expand Up @@ -53,7 +54,9 @@ export class MockBrowserEnvironment
}

// TODO: This code shouldn't need to be duplicated from DefaultBrowserEnvironment
getFormLayout<V extends FormValues>(layoutType: FormLayoutType = "list"): React.FC<LayoutProps<V>> {
getFormLayout<V extends FormValues>(
layoutType: FormLayoutType = "list"
): React.FC<LayoutProps<V>> {
const provider = this.getInjectable<FormLayoutProvider>(
BrowserDependencyName.FormLayoutProvider
);
Expand Down

0 comments on commit f640f95

Please sign in to comment.