Skip to content

Commit

Permalink
rename function
Browse files Browse the repository at this point in the history
  • Loading branch information
mollykreis committed Jan 3, 2025
1 parent 15d0256 commit 101fc8f
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions packages/nimble-components/src/combobox/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import { anchoredRegionTag } from '../anchored-region';
import { DropdownPosition } from '../patterns/dropdown/types';
import { overflow } from '../utilities/directive/overflow';
import { filterNoResultsLabel } from '../label-provider/core/label-tokens';
import { getRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';
import { createRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';

const labelTemplate = getRequiredVisibleLabelTemplate(html<Combobox>`
const labelTemplate = createRequiredVisibleLabelTemplate(html<Combobox>`
<label part="label" class="label">
<slot></slot>
</label>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { iconAsteriskTag } from '../../icons/asterisk';
import type { RequiredVisiblePattern } from './types';

/* eslint-disable @typescript-eslint/indent */
export function getRequiredVisibleLabelTemplate(
export function createRequiredVisibleLabelTemplate(
labelTemplate: ViewTemplate<RequiredVisiblePattern>
): ViewTemplate<RequiredVisiblePattern> {
return html`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import {
} from '../../../utilities/tests/fixture';
import { mixinRequiredVisiblePattern } from '../types';
import { styles } from '../styles';
import { getRequiredVisibleLabelTemplate } from '../template';
import { createRequiredVisibleLabelTemplate } from '../template';
import { processUpdates } from '../../../testing/async-helpers';
import { RequiredVisiblePatternPageObject } from '../testing/required-visible-pattern.pageobject';

const labelTemplate = getRequiredVisibleLabelTemplate(
const labelTemplate = createRequiredVisibleLabelTemplate(
html`<slot name="label"></slot>`
);
const elementName = uniqueElementName();
Expand Down
4 changes: 2 additions & 2 deletions packages/nimble-components/src/radio-group/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Orientation } from '@microsoft/fast-web-utilities';
import type { RadioGroup } from '.';
import { errorTextTemplate } from '../patterns/error/template';
import { iconExclamationMarkTag } from '../icons/exclamation-mark';
import { getRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';
import { createRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';

const labelTemplate = getRequiredVisibleLabelTemplate(
const labelTemplate = createRequiredVisibleLabelTemplate(
html<RadioGroup>`<slot name="label"></slot>`
);

Expand Down
4 changes: 2 additions & 2 deletions packages/nimble-components/src/select/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import { buttonTag } from '../button';
import { iconTimesTag } from '../icons/times';
import { ListOption } from '../list-option';
import { spinnerTag } from '../spinner';
import { getRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';
import { createRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';

export const isListOption = (
el: Element | undefined | null
Expand All @@ -41,7 +41,7 @@ export const isListOptionGroup = (
return n instanceof ListOptionGroup;
};

const labelTemplate = getRequiredVisibleLabelTemplate(html<Select>`
const labelTemplate = createRequiredVisibleLabelTemplate(html<Select>`
<label part="label" class="label" aria-hidden="true">
<slot ${ref('labelSlot')}></slot>
</label>
Expand Down
4 changes: 2 additions & 2 deletions packages/nimble-components/src/text-area/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import type { FoundationElementTemplate } from '@microsoft/fast-foundation';
import type { TextArea } from '.';
import { iconExclamationMarkTag } from '../icons/exclamation-mark';
import { errorTextTemplate } from '../patterns/error/template';
import { getRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';
import { createRequiredVisibleLabelTemplate } from '../patterns/required-visible/template';

const labelTemplate = getRequiredVisibleLabelTemplate(html<TextArea>`
const labelTemplate = createRequiredVisibleLabelTemplate(html<TextArea>`
<label
part="label"
for="control"
Expand Down

0 comments on commit 101fc8f

Please sign in to comment.