blob: db0d49ffcc7bb89fd003448b42911f971ddfb5a5 [file] [log] [blame]
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
const Preact = require('preact'); // eslint-disable-line
const h = require('preact').h; // eslint-disable-line
const createClass = require('preact-compat').createClass;
const PlatformButton = require('./platformbutton.jsx'); // eslint-disable-line
const SupportedPlatforms = createClass({
render: function () {
const sortedPlatforms = [
{keyword: 'cordova-android', icon: 'android', alt: 'Android'},
{keyword: 'cordova-ios', icon: 'ios', alt: 'iOS'},
{keyword: 'cordova-windows', icon: 'windows', alt: 'Windows'},
{keyword: 'cordova-osx', icon: 'osx', alt: 'macOS'},
{keyword: 'cordova-browser', icon: 'browser', alt: 'Browser'}
const platformsSupported = sortedPlatforms
.filter(function (platform) {
return this.props.keywords.indexOf(platform.keyword) > -1;
.map(function (platform) {
// Because these images are taken from a sprite sheet, we have
// to use title rather than alt-text
return (
<li key={this.props.plugin + '-' + platform.alt}>
<div className={platform.icon} title={platform.alt}></div>
return (
<ul className="results-supported-platforms">{platformsSupported}</ul>
module.exports = SupportedPlatforms;