Skip to content

Commit

Permalink
Update create-package template to use ForwardRefComponent (#20118)
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 authored Oct 6, 2021
1 parent 57d7a96 commit 8df3ce7
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import * as React from 'react';
import { use{{componentName}} } from './use{{componentName}}';
import { {{componentName}}Props } from './{{componentName}}.types';
import { render{{componentName}} } from './render{{componentName}}';
import { use{{componentName}}Styles } from './use{{componentName}}Styles';
import type { {{componentName}}Props } from './{{componentName}}.types';
import type { ForwardRefComponent } from '@fluentui/react-utilities';

/**
* {{componentName}} component
*/
export const {{componentName}} = React.forwardRef<HTMLElement, {{componentName}}Props>((props, ref) => {
export const {{componentName}}: ForwardRefComponent<{{componentName}}Props> = React.forwardRef((props, ref) => {
const state = use{{componentName}}(props, ref);

use{{componentName}}Styles(state);
Expand Down

0 comments on commit 8df3ce7

Please sign in to comment.