style: command viewer scroller

This commit is contained in:
jialin
2026-01-07 15:55:26 +08:00
parent 8f9fae9210
commit bbf09c2ea9
21 changed files with 136 additions and 153 deletions
+5 -1
View File
@@ -10,6 +10,7 @@ const HighlightCode: React.FC<{
copyable?: boolean;
theme?: 'light' | 'dark';
fixedTheme?: 'light' | 'dark';
xScrollable?: boolean;
height?: string | number;
style?: React.CSSProperties;
copyValue?: string;
@@ -21,7 +22,8 @@ const HighlightCode: React.FC<{
lang = 'bash',
copyable = true,
theme,
height = 'auto'
height = 'auto',
xScrollable = false
} = props;
const { userSettings } = useUserSettings();
@@ -40,6 +42,7 @@ const HighlightCode: React.FC<{
copyValue={copyValue}
copyable={copyable}
height={height}
xScrollable={xScrollable}
style={style}
/>
) : (
@@ -50,6 +53,7 @@ const HighlightCode: React.FC<{
copyValue={copyValue}
copyable={copyable}
height={height}
xScrollable={xScrollable}
/>
)}
</div>