-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(components): improvements for typescript
- Loading branch information
1 parent
e3bdaf8
commit e3f9409
Showing
12 changed files
with
206 additions
and
164 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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { crossorigin as validatorCrossorigin } from '../../utils/validators'; | ||
import Source from '#booster/components/BoosterImage/classes/Source'; | ||
|
||
export default { | ||
source: { | ||
type: [Source, Object], | ||
default: null | ||
}, | ||
|
||
title: { | ||
type: String, | ||
required: true | ||
}, | ||
|
||
alt: { | ||
type: String, | ||
default: null | ||
}, | ||
|
||
crossorigin: { | ||
type: [Boolean, String], | ||
default() { | ||
return null; | ||
}, | ||
validator: validatorCrossorigin | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import { crossorigin as validatorCrossorigin } from '../../utils/validators'; | ||
import SourceList from '#booster/components/BoosterPicture/classes/SourceList'; | ||
|
||
export default { | ||
sources: { | ||
type: [Array, SourceList], | ||
required: true | ||
}, | ||
|
||
formats: { | ||
type: Array, | ||
default() { | ||
return null; | ||
} | ||
}, | ||
|
||
title: { | ||
type: String, | ||
default: null | ||
}, | ||
|
||
alt: { | ||
type: String, | ||
default: null | ||
}, | ||
|
||
crossorigin: { | ||
type: [Boolean, String], | ||
default() { | ||
return null; | ||
}, | ||
validator: validatorCrossorigin | ||
}, | ||
|
||
sortSources: { | ||
type: Boolean, | ||
default: true | ||
} | ||
}; |
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
export default { | ||
autoplay: { | ||
type: Boolean, | ||
default: false | ||
}, | ||
|
||
mute: { | ||
type: Boolean, | ||
default: undefined | ||
}, | ||
|
||
url: { | ||
type: String, | ||
required: true | ||
}, | ||
|
||
title: { | ||
type: String, | ||
required: false, | ||
default: null | ||
}, | ||
|
||
options: { | ||
type: Object, | ||
default() { | ||
return {}; | ||
} | ||
}, | ||
|
||
posterSources: { | ||
type: Array, | ||
default() { | ||
return [ | ||
{ | ||
src: undefined, | ||
media: 'all', | ||
sizes: { | ||
default: '100vw' | ||
} | ||
} | ||
]; | ||
} | ||
} | ||
}; |
Oops, something went wrong.