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:
parent
a3ba8a8065
commit
32b058467c
2 changed files with 11 additions and 2 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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}
|
||||
>
|
||||
|
|
Loading…
Reference in a new issue