feat: rename component & fix style

This commit is contained in:
higorgoulart 2025-11-11 17:30:00 -03:00
parent 373ccf351a
commit 97c3b7d004
7 changed files with 14 additions and 18 deletions

View file

@ -3,7 +3,7 @@
import classNames from 'classnames';
import React from 'react';
import Icon from '@stremio/stremio-icons/react';
import styles from './IconsGroup.less';
import styles from './ActionsGroup.less';
import { Tooltip } from 'stremio/common/Tooltips';
type Item = {
@ -20,7 +20,7 @@ type Props = {
className?: string;
};
const IconsGroup = ({ items, className }: Props) => {
const ActionsGroup = ({ items, className }: Props) => {
return (
<div className={classNames(styles['group-container'], className)}>
{items.map((item, index) => (
@ -36,4 +36,4 @@ const IconsGroup = ({ items, className }: Props) => {
);
};
export default IconsGroup;
export default ActionsGroup;

View file

@ -0,0 +1,6 @@
// Copyright (C) 2017-2023 Smart code 203358507
import ActionsGroup from './ActionsGroup';
export { ActionsGroup };

View file

@ -1,6 +0,0 @@
// Copyright (C) 2017-2023 Smart code 203358507
import IconsGroup from './IconsGroup';
export { IconsGroup };

View file

@ -8,7 +8,7 @@ const { useTranslation } = require('react-i18next');
const { default: Icon } = require('@stremio/stremio-icons/react');
const { default: Button } = require('stremio/components/Button');
const { default: Image } = require('stremio/components/Image');
const { IconsGroup } = require('stremio/components/IconsGroup');
const { ActionsGroup } = require('stremio/components/ActionsGroup');
const ModalDialog = require('stremio/components/ModalDialog');
const SharePrompt = require('stremio/components/SharePrompt');
const CONSTANTS = require('stremio/common/CONSTANTS');
@ -223,7 +223,7 @@ const MetaPreview = React.forwardRef(({ className, compact, name, logo, backgrou
}
{
typeof toggleInLibrary === 'function' && typeof toggleWatched === 'function'
? <IconsGroup items={metaItemActions} className={styles['group-container']} />
? <ActionsGroup items={metaItemActions} className={styles['group-container']} />
: null
}
{
@ -242,7 +242,7 @@ const MetaPreview = React.forwardRef(({ className, compact, name, logo, backgrou
!compact && ratingInfo !== null ?
<Ratings
ratingInfo={ratingInfo}
className={styles['ratings']}
className={styles['group-container']}
/>
:
null

View file

@ -2,7 +2,7 @@
import React, { useMemo } from 'react';
import useRating from './useRating';
import { IconsGroup } from 'stremio/components/IconsGroup';
import { ActionsGroup } from 'stremio/components/ActionsGroup';
type Props = {
metaId?: string;
@ -26,7 +26,7 @@ const Ratings = ({ ratingInfo, className }: Props) => {
},
], [liked, loved, disabled, onLiked, onLoved]);
return <IconsGroup items={items} className={className} />;
return <ActionsGroup items={items} className={className} />;
};
export default Ratings;

View file

@ -249,10 +249,6 @@
border-radius: 2rem;
}
}
.ratings {
margin-right: 0;
}
}
}