@awsui/components-react
Version:
AWS UI is a collection of [React](https://reactjs.org/) components that help create intuitive, responsive, and accessible user experiences for web applications. It is developed by Amazon Web Services (AWS). This work is available under the terms of the [A
21 lines (20 loc) • 617 B
JavaScript
import './styles.css.js';
import { PACKAGE_VERSION } from '../environment';
if (typeof window !== 'undefined') {
if (!window.awsuiVersions) {
window.awsuiVersions = {};
}
if (!window.awsuiVersions.components) {
window.awsuiVersions.components = [];
}
window.awsuiVersions.components.push(PACKAGE_VERSION);
}
export function getBaseProps(props) {
var baseProps = {};
Object.keys(props).forEach(function (prop) {
if (prop === 'id' || prop === 'className' || prop.match(/^data-/)) {
baseProps[prop] = props[prop];
}
});
return baseProps;
}