@@ -13,7 +13,7 @@ import {
1313 LinkIcon ,
1414 LawIcon ,
1515 StarIcon ,
16- GitForkIcon ,
16+ RepoForkedIcon ,
1717 AlertIcon ,
1818 TableIcon ,
1919 PeopleIcon ,
@@ -112,7 +112,7 @@ export function WithIcon(): JSX.Element {
112112 </ ActionList . Item >
113113 < ActionList . Item >
114114 < ActionList . LeadingVisual >
115- < GitForkIcon />
115+ < RepoForkedIcon />
116116 </ ActionList . LeadingVisual >
117117 3 forks
118118 </ ActionList . Item >
@@ -241,7 +241,7 @@ SingleSelectListStory.storyName = 'Single Select'
241241export function MultiSelectListStory ( ) : JSX . Element {
242242 const [ assignees , setAssignees ] = React . useState ( users . slice ( 0 , 2 ) )
243243
244- const toggleAssignee = assignee => {
244+ const toggleAssignee = ( assignee : typeof users [ number ] ) => {
245245 const assigneeIndex = assignees . findIndex ( a => a . login === assignee . login )
246246
247247 if ( assigneeIndex === - 1 ) setAssignees ( [ ...assignees , assignee ] )
@@ -307,7 +307,7 @@ DisabledStory.storyName = 'Disabled Items'
307307export function GroupsStory ( ) : JSX . Element {
308308 const [ assignees , setAssignees ] = React . useState ( users . slice ( 0 , 1 ) )
309309
310- const toggleAssignee = assignee => {
310+ const toggleAssignee = ( assignee : typeof users [ number ] ) => {
311311 const assigneeIndex = assignees . findIndex ( a => a . login === assignee . login )
312312
313313 if ( assigneeIndex === - 1 ) setAssignees ( [ ...assignees , assignee ] )
@@ -635,7 +635,8 @@ export function DOMPropsStory(): JSX.Element {
635635 < h1 > Simple List</ h1 >
636636 < ErsatzOverlay >
637637 < ActionList >
638- < ActionList . Item id = "something" onClick = { event => alert ( `Id is '${ event . target . id } '` ) } >
638+ { /* eslint-disable-next-line @typescript-eslint/no-explicit-any */ }
639+ < ActionList . Item id = "something" onClick = { ( event : any ) => alert ( `Id is '${ event . target . id } '` ) } >
639640 Has an id
640641 </ ActionList . Item >
641642 </ ActionList >
@@ -901,7 +902,7 @@ export function NestedChildren(): JSX.Element {
901902}
902903NestedChildren . storyName = 'Nested Children'
903904
904- const ReviewerDescription = ( { user} ) => {
905+ const ReviewerDescription = ( { user} : { user : typeof users [ number ] } ) => {
905906 const usersRecentlyEditedFile = users . slice ( 0 , 2 )
906907
907908 if ( usersRecentlyEditedFile . find ( u => u . login === user . login ) ) {
@@ -938,7 +939,7 @@ export function ChildWithInternalState(): JSX.Element {
938939}
939940ChildWithInternalState . storyName = 'Child with internal state'
940941
941- const StatefulChild = props => {
942+ const StatefulChild : React . FC = props => {
942943 const [ nameVisible , setNameVisibility ] = React . useState ( false )
943944 const toggle = ( ) => {
944945 setNameVisibility ( ! nameVisible )
@@ -1206,7 +1207,9 @@ const repos = [
12061207export function AsyncListStory ( ) : JSX . Element {
12071208 const [ results , setResults ] = React . useState ( repos . slice ( 0 , 6 ) )
12081209 const [ loading , setLoading ] = React . useState ( false )
1209- const filter = async event => {
1210+
1211+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
1212+ const filter = async ( event : any ) => {
12101213 setLoading ( true )
12111214 const filteredResults = await filterSlowly ( event . target . value )
12121215 setResults ( filteredResults )
@@ -1244,7 +1247,7 @@ export function AsyncListStory(): JSX.Element {
12441247}
12451248AsyncListStory . storyName = 'Async List Options'
12461249
1247- const filterSlowly = async query => {
1250+ const filterSlowly = async ( query : string ) => {
12481251 // sleep for 1s before returning results
12491252 await new Promise ( resolve => setTimeout ( resolve , 1000 ) )
12501253 return await repos . filter ( name => name . includes ( query ) )
0 commit comments