mirror of
https://github.com/flarum/framework.git
synced 2025-03-15 00:05:12 +08:00
Componentize welcome hero close button
This commit is contained in:
parent
fabc448572
commit
d309a21304
@ -1,5 +1,5 @@
|
||||
import Component from 'flarum/Component';
|
||||
import icon from 'flarum/helpers/icon';
|
||||
import Button from 'flarum/components/Button';
|
||||
|
||||
/**
|
||||
* The `WelcomeHero` component displays a hero that welcomes the user to the
|
||||
@ -22,9 +22,11 @@ export default class WelcomeHero extends Component {
|
||||
return (
|
||||
<header className="Hero WelcomeHero">
|
||||
<div class="container">
|
||||
<button className="Hero-close Button Button--icon Button--link" onclick={slideUp}>
|
||||
{icon('times')}
|
||||
</button>
|
||||
{Button.component({
|
||||
icon: 'times',
|
||||
onclick: slideUp,
|
||||
className: 'Hero-close Button Button--icon Button--link'
|
||||
})}
|
||||
|
||||
<div className="containerNarrow">
|
||||
<h2 className="Hero-title">{app.forum.attribute('welcomeTitle')}</h2>
|
||||
|
@ -19,6 +19,7 @@
|
||||
float: right;
|
||||
margin-top: -10px;
|
||||
color: inherit;
|
||||
opacity: 0.5;
|
||||
}
|
||||
.Hero-subtitle {
|
||||
margin: 8px 0 0;
|
||||
|
Loading…
x
Reference in New Issue
Block a user