Skip to content

Commit

Permalink
Update create-package template to use ForwardRefComponent (microsoft#…
Browse files Browse the repository at this point in the history
  • Loading branch information
ecraig12345 authored and Marion Le Pontois committed Jan 17, 2022
1 parent 4d4f457 commit d4bca65
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 d4bca65

Please sign in to comment.