pl-fe: styles migrations

Signed-off-by: nicole mikołajczyk <git@mkljczk.pl>
This commit is contained in:
nicole mikołajczyk
2025-10-19 19:28:38 +02:00
parent fced7f93ff
commit e61d6e64e1
12 changed files with 219 additions and 113 deletions

View File

@@ -55,7 +55,6 @@ const Button = React.forwardRef<HTMLButtonElement, IButton>(({
const themeClass = useButtonStyles({
theme,
block,
disabled,
size,
});
@@ -68,7 +67,7 @@ const Button = React.forwardRef<HTMLButtonElement, IButton>(({
const renderButton = () => (
<button
{...props}
className={clsx('rtl:space-x-reverse', themeClass, className)}
className={clsx(themeClass, className)}
disabled={disabled}
onClick={handleClick}
ref={ref}

View File

@@ -27,7 +27,6 @@ type ButtonThemes = keyof typeof themes
type IButtonStyles = {
theme: ButtonThemes;
block: boolean;
disabled: boolean;
size: ButtonSizes;
}
@@ -35,12 +34,10 @@ type IButtonStyles = {
const useButtonStyles = ({
theme,
block,
disabled,
size,
}: IButtonStyles) => {
const buttonStyle = clsx({
'inline-flex items-center place-content-center border font-medium rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none transition-all': true,
'select-none disabled:opacity-75 disabled:cursor-default': disabled,
'rtl:space-x-reverse inline-flex items-center place-content-center border font-medium rounded-full focus:outline-none focus:ring-2 focus:ring-offset-2 appearance-none transition-all disabled:select-none disabled:opacity-75 disabled:cursor-default': true,
[`${themes[theme]}`]: true,
[`${sizes[size]}`]: true,
'flex w-full justify-center': block,

View File

@@ -56,7 +56,7 @@ const Main: React.FC<React.HTMLAttributes<HTMLDivElement>> = ({ children, classN
<main
className={clsx({
'⁂-layout__main': true,
'⁂-layout__main--chats-page': features.chats,
'⁂-layout__main--chats': features.chats,
}, className)}
>
{children}