-
Notifications
You must be signed in to change notification settings - Fork 134
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Type definitions for Vue 3 Composition API (#355)
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per #276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
- Loading branch information
1 parent
49de51d
commit 0260208
Showing
7 changed files
with
11,245 additions
and
14,160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,36 @@ | ||
import { ComponentPublicInstance } from 'vue' | ||
import { IconDefinition } from '@fortawesome/fontawesome-svg-core'; | ||
import { DefineComponent } from 'vue' | ||
|
||
interface FontAwesomeIconProps { | ||
border: boolean | ||
fixedWidth: boolean | ||
flip: boolean | 'horizontal' | 'vertical' | 'both' | ||
icon: object | Array<string> | string | ||
mask: object | Array<string> | string | null | ||
listItem: boolean | ||
pull: 'right' | 'left' | null | ||
pulse: boolean | ||
rotation: 90 | 180 | 270 | '90' | '180' | '270' | null | ||
swapOpacity: boolean | ||
size: 'lg' | 'xs' | 'sm' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | null | ||
spin: boolean | ||
transform: object | string | null | ||
symbol: boolean | string | ||
title: string | null | ||
inverse: boolean | ||
border?: boolean | ||
fixedWidth?: boolean | ||
flip?: 'horizontal' | 'vertical' | 'both' | ||
icon: object | Array<string> | string | IconDefinition | ||
mask?: object | Array<string> | string | ||
listItem?: boolean | ||
pull?: 'right' | 'left' | ||
pulse?: boolean | ||
rotation?: 90 | 180 | 270 | '90' | '180' | '270' | ||
swapOpacity?: boolean | ||
size?: 'lg' | 'xs' | 'sm' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x' | ||
spin?: boolean | ||
transform?: object | string | ||
symbol?: boolean | string | ||
title?: string | ||
inverse?: boolean | ||
} | ||
|
||
interface FontAwesomeLayersProps { | ||
fixedWidth: boolean | ||
fixedWidth?: boolean | ||
} | ||
|
||
interface FontAwesomeLayersTextProps { | ||
value: string | number | ||
transform: object | string | null | ||
counter: boolean | ||
position: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | null | ||
transform?: object | string | ||
counter?: boolean | ||
position?: 'bottom-left' | 'bottom-right' | 'top-left' | 'top-right' | ||
} | ||
|
||
declare const FontAwesomeIcon: ComponentPublicInstance<FontAwesomeIconProps> | ||
declare const FontAwesomeLayers: ComponentPublicInstance<FontAwesomeLayersProps> | ||
declare const FontAwesomeLayersText: ComponentPublicInstance<FontAwesomeLayersTextProps> | ||
declare const FontAwesomeIcon: DefineComponent<FontAwesomeIconProps> | ||
declare const FontAwesomeLayers: DefineComponent<FontAwesomeLayersProps> | ||
declare const FontAwesomeLayersText: DefineComponent<FontAwesomeLayersTextProps> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.