0
Fork 0
mirror of https://github.com/logto-io/logto.git synced 2024-12-23 20:33:16 -05:00

fix(console): button inline flex (#407)

* fix(console): button inline flex

* fix(console): change to inline-flex in button
This commit is contained in:
Wang Sijie 2022-03-18 08:46:02 +08:00 committed by GitHub
parent a3ba8a8065
commit 32b058467c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View file

@ -7,9 +7,12 @@
font: var(--font-button);
transition: background 0.2s ease-in-out;
@include _.text-ellipsis;
display: flex;
align-items: center;
&.withIcon {
display: inline-flex;
}
&:not(:disabled) {
cursor: pointer;
}

View file

@ -1,4 +1,5 @@
import { I18nKey } from '@logto/phrases';
import { conditionalString } from '@silverhand/essentials';
import classNames from 'classnames';
import React, { HTMLProps, ReactNode } from 'react';
import { useTranslation } from 'react-i18next';
@ -35,7 +36,12 @@ const Button = ({
return (
<button
className={classNames(styles.button, styles[type], styles[size])}
className={classNames(
styles.button,
styles[type],
styles[size],
conditionalString(icon && styles.withIcon)
)}
type={htmlType}
{...rest}
>