mirror of
https://github.com/discourse/discourse.git
synced 2024-12-04 09:10:03 +08:00
8632ea5a63
This commit changes the custom flags admin config area to use the AdminPageHeader component and conforms to the new admin UI guidelines. Also makes some slight modifications to the reusable components to handle using a @route for an action button.
51 lines
1.1 KiB
Plaintext
51 lines
1.1 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}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const PrimaryButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-primary"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const DangerButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-danger"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|
|
export const DefaultButton = <template>
|
|
<AdminPageActionButton
|
|
class="btn-default"
|
|
...attributes
|
|
@action={{@action}}
|
|
@route={{@route}}
|
|
@label={{@label}}
|
|
@title={{@title}}
|
|
@icon={{@icon}}
|
|
@isLoading={{@isLoading}}
|
|
/>
|
|
</template>;
|