mirror of
https://github.com/zoriya/v10.git
synced 2026-08-09 07:37:48 +00:00
25 lines
586 B
JavaScript
25 lines
586 B
JavaScript
import { pascalCase } from '@videojs/utils/string';
|
|
|
|
const PASCAL_CASE_ICON_NAME_OVERRIDES = {
|
|
'airplay-enter': 'AirPlayEnter',
|
|
'airplay-exit': 'AirPlayExit',
|
|
};
|
|
|
|
/** @param {string} name */
|
|
function iconComponentName(name) {
|
|
return `${PASCAL_CASE_ICON_NAME_OVERRIDES[name] ?? pascalCase(name)}Icon`;
|
|
}
|
|
|
|
/** @param {string} set */
|
|
const iconConfig = (set) => ({
|
|
components: [
|
|
{
|
|
files: `./src/assets/${set}/*.svg`,
|
|
name: iconComponentName,
|
|
},
|
|
],
|
|
output: `./src/__generated__/${set}.ts`,
|
|
});
|
|
|
|
export default [iconConfig('default'), iconConfig('minimal')];
|