diff --git a/webui/src/common/components/Button/Button.jsx b/webui/src/common/components/Button/Button.jsx index 03be7e3..2c19774 100644 --- a/webui/src/common/components/Button/Button.jsx +++ b/webui/src/common/components/Button/Button.jsx @@ -16,6 +16,8 @@ export const Button = ({ ...rest }) => { const isDisabled = disabled || loading; + const isIconOnly = (icon || iconRight) && !children; + return ( {loading && } {icon && {icon}} - {children} + {children && {children}} {iconRight && {iconRight}} ); diff --git a/webui/src/common/components/Button/styles.sass b/webui/src/common/components/Button/styles.sass index e7bf5c6..83493cb 100644 --- a/webui/src/common/components/Button/styles.sass +++ b/webui/src/common/components/Button/styles.sass @@ -69,6 +69,20 @@ --c-text: #ffffff background: var(--c-bg) border-color: var(--c-border) + + &.btn--icon-only + padding: 0.75rem + aspect-ratio: 1 + justify-content: center + + &.btn--sm + padding: 0.6rem + + &.btn--lg + padding: 0.9rem + + .btn-icon + margin: 0 .btn-icon display: inline-flex