mirror of
https://github.com/discourse/discourse.git
synced 2024-11-30 05:53:55 +08:00
be5c37a6d4
* UX: Add a description about badges * WIP: Apply admin UI guidelines * FIX: Add routeModels to dbutton Allows routeModels to be passed to a DButton along with route, so we can use them as a LinkTo replacement in more places. Also fix up badges admin page header. * UX: Reorder action buttons * UX: Change header hierarchy to better align page's content structure * UX: Update copy and remove unnecessary UI elements * UX: Adjust header's icon spacing * UX: Fix the header action buttons on mobile * Apply prettier --------- Co-authored-by: Martin Brennan <martin@discourse.org>
55 lines
1.2 KiB
Plaintext
55 lines
1.2 KiB
Plaintext
import DButton from "discourse/components/d-button";
|
|
|
|
export const AdminPageActionButton = <template>
|
|
<DButton
|
|
class="admin-page-action-button btn-small"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@routeModels={{@routeModels}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const PrimaryButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-primary"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@routeModels={{@routeModels}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const DangerButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-danger"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@routeModels={{@routeModels}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const DefaultButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-default"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@routeModels={{@routeModels}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|