Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

606 B
Raw Blame
import { Text } from '@lobehub/ui';
import { type ReactNode } from 'react';

import { useNavItemMetrics } from '../density';

const SectionTitle = ({ children }: { children: ReactNode }) => {
  const metrics = useNavItemMetrics();

  return (
    <Text ellipsis color={metrics.sectionLabelColor} fontSize={12} weight={500}>
      {children}
    </Text>
  );
};

export const useSectionTriggerStyle = () => {
  const metrics = useNavItemMetrics();
  return {
    paddingBlock: metrics.sectionTriggerPaddingBlock,
    paddingInline: metrics.sectionTriggerPaddingInline,
  };
};

export default SectionTitle;