- Add SkySection component for displaying Bluesky-specific file information - Add byteCountToHumanSize utility for formatting file sizes - Update PostFiles, FileCarousel, FileDetails, and DisplayedFile components - Enhance posts helper with file display logic - Update post model and view templates - Remove deprecated file details sky section partial
31 lines
668 B
TypeScript
31 lines
668 B
TypeScript
import * as React from 'react';
|
|
|
|
export interface SkySectionProps {
|
|
title: string;
|
|
children?: React.ReactNode;
|
|
contentClassName?: string;
|
|
}
|
|
|
|
export const SkySection: React.FC<SkySectionProps> = ({
|
|
title,
|
|
children,
|
|
contentClassName,
|
|
}) => {
|
|
return (
|
|
<div className="sky-section w-full">
|
|
<SkySectionHeader title={title} />
|
|
<div className={contentClassName}>{children}</div>
|
|
</div>
|
|
);
|
|
};
|
|
|
|
export default SkySection;
|
|
|
|
export const SkySectionHeader: React.FC<SkySectionProps> = ({ title }) => {
|
|
return (
|
|
<div className="section-header flex items-center justify-between border-b py-2">
|
|
<span>{title}</span>
|
|
</div>
|
|
);
|
|
};
|