Screenshot

API
There are the following attributes:
- maintitle - sets the headline text
- subtitle - sets the subtitle text
- showlogo - true=shown (default), anything else hides the logo
- gradientStyle - one of: "default" (default), "alt1" and "ECL411"
- assetBaseURL - location to the icons which this element needs. If omitted, "./assets" is assumed. User of this element has to make sure the assets exist in the specified location (please see also webpack.config.js below).
Note: The default height is 128px and can be modified with the style property.
Note2: maintitle, subtitle and showlogo can be used at runtime
Usage with WebPack
package.json
"dependencies": {
"@ewc-lib/ewc-banner": "^0.1.0"
}
webpack.config.js
const CopyPlugin = require("copy-webpack-plugin")
...
plugins: [
new CopyPlugin({
patterns: [
{ from: "./node_modules/@ewc-lib/ewc-banner/assets/*.svg", to: "./assets" }
],
}),
]
index.html
<!DOCTYPE html>
<html>
<head>
<style>
body{
font-family: 'Arial', sans-serif;
margin: 0;
}
</style>
</head>
<body>
<script src="bundle.js"></script>
<ewc-banner mainTitle="Demonstration of a title in a banner" subTitle="Demonstration of a subtitle"></ewc-banner>
</body>
</html>
index.js
import "@ewc-lib/ewc-banner"