mirror of
https://github.com/Sonny93/my-links.git
synced 2025-12-08 22:53:25 +00:00
21 lines
589 B
TypeScript
21 lines
589 B
TypeScript
import styled from '@emotion/styled';
|
|
import TextEllipsis from '~/components/common/text_ellipsis';
|
|
import useActiveCollection from '~/hooks/use_active_collection';
|
|
|
|
const CollectionDescriptionStyle = styled.div({
|
|
width: '100%',
|
|
fontSize: '0.85rem',
|
|
marginBottom: '0.5rem',
|
|
});
|
|
|
|
export default function CollectionDescription() {
|
|
const { activeCollection } = useActiveCollection();
|
|
return (
|
|
activeCollection && (
|
|
<CollectionDescriptionStyle>
|
|
<TextEllipsis lines={3}>{activeCollection?.description}</TextEllipsis>
|
|
</CollectionDescriptionStyle>
|
|
)
|
|
);
|
|
}
|