1
0
mirror of https://github.com/flarum/core.git synced 2025-07-23 17:51:24 +02:00

Componentize welcome hero close button

This commit is contained in:
Toby Zerner
2015-07-23 14:47:27 +09:30
parent 8c6e87760c
commit 61e4763c68
2 changed files with 7 additions and 4 deletions

View File

@@ -1,5 +1,5 @@
import Component from 'flarum/Component'; 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 * The `WelcomeHero` component displays a hero that welcomes the user to the
@@ -22,9 +22,11 @@ export default class WelcomeHero extends Component {
return ( return (
<header className="Hero WelcomeHero"> <header className="Hero WelcomeHero">
<div class="container"> <div class="container">
<button className="Hero-close Button Button--icon Button--link" onclick={slideUp}> {Button.component({
{icon('times')} icon: 'times',
</button> onclick: slideUp,
className: 'Hero-close Button Button--icon Button--link'
})}
<div className="containerNarrow"> <div className="containerNarrow">
<h2 className="Hero-title">{app.forum.attribute('welcomeTitle')}</h2> <h2 className="Hero-title">{app.forum.attribute('welcomeTitle')}</h2>

View File

@@ -19,6 +19,7 @@
float: right; float: right;
margin-top: -10px; margin-top: -10px;
color: inherit; color: inherit;
opacity: 0.5;
} }
.Hero-subtitle { .Hero-subtitle {
margin: 8px 0 0; margin: 8px 0 0;