2024-08-20 07:59:43 +08:00
|
|
|
import DButton from "discourse/components/d-button";
|
|
|
|
|
|
|
|
export const AdminPageActionButton = <template>
|
|
|
|
<DButton
|
|
|
|
class="admin-page-action-button btn-small"
|
|
|
|
...attributes
|
|
|
|
@action={{@action}}
|
2024-08-21 08:42:00 +08:00
|
|
|
@route={{@route}}
|
2024-08-20 07:59:43 +08:00
|
|
|
@label={{@label}}
|
|
|
|
@title={{@title}}
|
|
|
|
@icon={{@icon}}
|
|
|
|
@isLoading={{@isLoading}}
|
|
|
|
/>
|
|
|
|
</template>;
|
|
|
|
export const PrimaryButton = <template>
|
|
|
|
<AdminPageActionButton
|
|
|
|
class="btn-primary"
|
|
|
|
...attributes
|
|
|
|
@action={{@action}}
|
2024-08-21 08:42:00 +08:00
|
|
|
@route={{@route}}
|
2024-08-20 07:59:43 +08:00
|
|
|
@label={{@label}}
|
|
|
|
@title={{@title}}
|
|
|
|
@icon={{@icon}}
|
|
|
|
@isLoading={{@isLoading}}
|
|
|
|
/>
|
|
|
|
</template>;
|
|
|
|
export const DangerButton = <template>
|
|
|
|
<AdminPageActionButton
|
|
|
|
class="btn-danger"
|
|
|
|
...attributes
|
|
|
|
@action={{@action}}
|
2024-08-21 08:42:00 +08:00
|
|
|
@route={{@route}}
|
2024-08-20 07:59:43 +08:00
|
|
|
@label={{@label}}
|
|
|
|
@title={{@title}}
|
|
|
|
@icon={{@icon}}
|
|
|
|
@isLoading={{@isLoading}}
|
|
|
|
/>
|
|
|
|
</template>;
|
|
|
|
export const DefaultButton = <template>
|
|
|
|
<AdminPageActionButton
|
|
|
|
class="btn-default"
|
|
|
|
...attributes
|
|
|
|
@action={{@action}}
|
2024-08-21 08:42:00 +08:00
|
|
|
@route={{@route}}
|
2024-08-20 07:59:43 +08:00
|
|
|
@label={{@label}}
|
|
|
|
@title={{@title}}
|
|
|
|
@icon={{@icon}}
|
|
|
|
@isLoading={{@isLoading}}
|
|
|
|
/>
|
|
|
|
</template>;
|