import React from 'react'; import styled from 'styled-components'; import type { IconProps } from '@redocly/theme/icons/types'; import { getCssColorVariable } from '@redocly/theme/core/utils'; export interface AiStarsIconProps extends IconProps { background?: string; borderRadius?: string; padding?: string; margin?: string; } const Icon = (props: AiStarsIconProps) => { const { color, background, borderRadius, padding, margin, ...restProps } = props; return ( ); }; export const AiStarsIcon = styled(Icon).attrs({ 'data-component-name': 'icons/AiStarsIcon/AiStarsIcon', })` height: ${({ size }) => size || '16px'}; width: ${({ size }) => size || '16px'}; ${({ background, borderRadius, margin, padding, size }) => background && ` display: flex; align-items: center; justify-content: center; flex-shrink: 0; background: ${getCssColorVariable(background)}; width: ${size || '16px'}; height: ${size || '16px'}; padding: ${padding || 'var(--spacing-xs)'}; margin: ${margin || '0'}; border-radius: ${background && borderRadius ? borderRadius : 'none'}; svg { width: calc(${size || '16px'} - 2 * (${padding || 'var(--spacing-xs)'})); height: calc(${size || '16px'} - 2 * (${padding || 'var(--spacing-xs)'})); flex-shrink: 0; } `} color: ${({ color }) => color && getCssColorVariable(color)}; `;