mirror of
https://github.com/Unleash/unleash.git
synced 2025-10-13 11:17:26 +02:00
* feat: toggle overview accordions * feat: accordion metrics * feat: result * add permission button * fix: remove feature environment container from strategies tab * chore: delete unused code * fix: remove console log * fix: remove unused code * fix: cleanup * fix: refactor * fix: add empty states * fix: loading * feat: mobile accordions * fix: button * fix: strategies * fix: cleanup * fix: remove unused params * fix: strategy button container * fix: alter gradual rollout id * fix: update userid strategy item * fix: string truncator * fix: strategy link * fix: strategies tab * fix: remove unused imports * fix: visual improvements * fix: add border
36 lines
800 B
TypeScript
36 lines
800 B
TypeScript
import { Tooltip } from '@material-ui/core';
|
|
|
|
interface IStringTruncatorProps {
|
|
text: string;
|
|
maxWidth: string;
|
|
className?: string;
|
|
}
|
|
|
|
const StringTruncator = ({
|
|
text,
|
|
maxWidth,
|
|
className,
|
|
...rest
|
|
}: IStringTruncatorProps) => {
|
|
return (
|
|
<Tooltip title={text} arrow>
|
|
<span
|
|
data-loading
|
|
className={className}
|
|
style={{
|
|
maxWidth: `${maxWidth}px`,
|
|
textOverflow: 'ellipsis',
|
|
overflow: 'hidden',
|
|
whiteSpace: 'nowrap',
|
|
display: 'inline-block',
|
|
}}
|
|
{...rest}
|
|
>
|
|
{text}
|
|
</span>
|
|
</Tooltip>
|
|
);
|
|
};
|
|
|
|
export default StringTruncator;
|